- Notifications
You must be signed in to change notification settings - Fork 246
Expand file tree
/
Copy pathSWITCH.java
More file actions
Latest commit
23 lines (20 loc) · 555 Bytes
/
Copy pathSWITCH.java
File metadata and controls
23 lines (20 loc) · 555 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
importjava.util.*;
publicclassSWITCH {
publicstaticvoidmain(String[] args) {
Scannersc = newScanner(System.in);
intbutton = sc.nextInt();
switch (button) {
case1:
System.out.println("hello");
break;
case2:
System.out.println("Namaste");
break;
case3:
System.out.println("Bonjour");
break;
default:
System.out.println("Error Button");
}
}
}