Source Code
Session3.java
import java.util.*;
public class Session3 {
public static void main(String[] args) {
String firstName = ""; // add your name
System.out.println("Session 3 - " + firstName);
// Menu
System.out.println("Menu");
System.out.println("E1 - Example 1");
// setup Scanner
Scanner in = new Scanner(System.in);
System.out.print("Choice: ");
String choice = in.nextLine();
// switch choices
switch(choice) {
// case E1
// case X, Y or Z
// default case
// Example 2
// Example 3
// Example 4
// Example 5
// Example 6
// Example 7
// Example 8
// Example 9
// Example 10
// Example 11
// end of switch
}
// close scanner
in.close();
}
}
Last updated