forked from aryan1403/wipro-rps-training
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsc.java
34 lines (29 loc) · 824 Bytes
/
sc.java
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
public class sc {
public static void main(String[] args) {
// menu-driven program
int choice = 10;
// 1 --> start
// 2 --> resume
// 3 --> stop
/* if(choice == 1) {
} else if(choice == 2) {
} else if(choice == 3) {
} else {
System.out.println("Wrong choice");
} */
switch (choice) {
case 1:
System.out.println("1 selected, started");
break;
case 2:
System.out.println("2 selected, resumed");
break;
case 3:
System.out.println("3 selected, stopped");
break;
default:
System.out.println("Wrong choice");
break;
}
}
}