-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenuChoice
More file actions
45 lines (35 loc) · 807 Bytes
/
MenuChoice
File metadata and controls
45 lines (35 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package W1Ark;
import java.util.Scanner;
public class MenuChoice {
public static void main(String[] args) {
System.out.println("*** Welcome to the menu world. *** \n");
System.out.println("Please enter you menu choice number. \n");
System.out.println("1. Main Menu.");
System.out.println("2. Sub-Menu.");
System.out.println("3. Last Menu. \n");
Scanner Keyboard = new Scanner(System.in);
int choice = Keyboard.nextInt();
switch(choice)
{
case 1:
{
System.out.println("Welcome to the main menu.\n");
break;
}
case 2:
{
System.out.println("Welcome to the sub-main menu.\n");
break;
}
case 3:
{
System.out.println("Welcome to the last main menu.\n");
break;
}
default:
{
System.out.println("Wrong entery.\n");
}
}
}
}