-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNestedSwitch.java
More file actions
33 lines (31 loc) · 949 Bytes
/
Copy pathNestedSwitch.java
File metadata and controls
33 lines (31 loc) · 949 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
import java.util.Scanner;
class NestedSwitch {
public static void main(String[] args) {
System.out.println("ENTER THE EMP ID");
Scanner si = new Scanner(System.in);
int EMPID = si.nextInt();
String department = si.next();
switch (EMPID) {
case 1:
System.out.println("ABDULLAH HAIDER");
break;
case 2:
System.out.println("rahul apni ma chuda");
break;
case 3:
switch (department) {
case "IT":
System.out.println("IT DEPARTMENT");
break;
case "Management":
System.out.println("this is management");
break;
default:
break;
}
default:
break;
}
si.close();
}
}