Download presentation
Presentation is loading. Please wait.
1
Maha AlSaif 200800420 Maryam AlQattan 200900025
Java Exercises Maha AlSaif Maryam AlQattan
2
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 + "\""); } }
3
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
4
What is the code used to create this output?
5
The code..
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.