Maha AlSaif 200800420 Maryam AlQattan 200900025 Java Exercises Maha AlSaif 200800420 Maryam AlQattan 200900025
Find the three errors in the following code. import java.util.Scanner public class Echo { //----------------------------------------------------------------- // Reads a character string from the user and prints it. public static void main (String[ args) String message; Scanner scan = new Scanner (System.in); System.out.println (“What is your name?"); message = scan.nextLine(); System.out.println ("You entered: \"" + message + "\""); } }
Add Remove import java.util.Scanner; public class Echo { //----------------------------------------------------------------- // Reads a character string from the user and prints it. public static void main (String[] args) String message; Scanner scan = new Scanner (System.in); System.out.println (“What is your name?"); message = scan.nextLine(); System.out.println ("You entered: \"" + message + "\""); } } Add Remove
What is the code used to create this output?
The code..