Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Submit + Continue Output Assignment More New + 16.2.4 Lesson 4.3 Fix the Sum Save Test Cases Docs Grade Sums.java Status: Not Submitted C Sums.java
Submit + Continue Output Assignment More New + 16.2.4 Lesson 4.3 Fix the Sum Save Test Cases Docs Grade Sums.java Status: Not Submitted C Sums.java 5 points 1 * import java. util . Scanner; 2 public class Sums The method 3 + { String sumString (int one, int two) 4 public static void main(String args) 5 + is intended to return a String representing the sum of one and two . 6 Scanner input = new Scanner (System. in); 7 For example: 8 System. out . printIn("Enter your first number: ") ; 9 int num1 = input. nextInt( ) ; sumString(6, 10) 10 11 System. out . printIn("\ Enter your second number: ") ; Should return a String of the form 12 int num2 = input . nextInt( ); 13 6 + 10 = 16 14 System. out . printIn(sumString (num1, num2) ) ; But it is currently returning a String of the form 15 16 6 + 10 = 610 17 public static String sumString(int one, int two) 18 - Your job is to debug this method so that it returns the proper String! 19 / / ONLY Fix this line below to correctly add the 2 numbers! 20 return one + " + " . + two + " = " + one + two; 21 22 23 } 24
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started