Presentation is loading. Please wait.

Presentation is loading. Please wait.

Maha AlSaif Maryam AlQattan

Similar presentations


Presentation on theme: "Maha AlSaif Maryam AlQattan"— Presentation transcript:

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..


Download ppt "Maha AlSaif Maryam AlQattan"

Similar presentations


Ads by Google