Question: The file provided in the code editor to the right contains syntax and/or logic errors. In each case, determine and fix the problem, remove all

The file provided in the code editor to the right contains syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. Grading 1 // This application gets a user's name and displays a greeting 2 import java.util.Scanner; 3 public class DebugThree3 4 { 5 public static void main(String args[]) 6 { 7 String name; 8 name = getName() 9 displayGreeting(namme); 10 } 11 public static String getName(void) 12 { 13 String name; 14 Scanner input = new Scanner(System.in); System.in.print("Enter name "); 16 name = input.nexlLine(); 17 return namer; 18 } 19 public static displayGreeting(String name) 20 { 21 System.outprintln("Hello, " + name + "!"); 22 } 23 } Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre- configured tests against your code to calculate a grade. 15 Once you are happy with your results, click the Submit button to record your score. 24
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
