-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitchCase.java
More file actions
19 lines (19 loc) · 549 Bytes
/
SwitchCase.java
File metadata and controls
19 lines (19 loc) · 549 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public class SwitchCase {
public static void main(String[] args){
int x=2;
switch(x){
case 1:
System.out.println("x is equal to 1");
break;
case 2:
System.out.println("x is equal to 2");
break;
case 3:
System.out.println("x is equal to 3");
break;
default: // this can be None
System.out.println("x is not belong to 1,2,3");
break;
}
}
}