-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetswitch.java
More file actions
46 lines (42 loc) · 767 Bytes
/
Getswitch.java
File metadata and controls
46 lines (42 loc) · 767 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
46
package java02;
import java.util.Scanner;
public class Getswitch {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自动生成的方法存根
System.out.println("周几");
Scanner scan = new Scanner(System.in);
int week = scan.nextInt();
// long name = scan.nextLong();
switch(week){
case 1:
System.out.println("周1");
break;
case 2:
System.out.println("周2");
break;
case 3:
System.out.println("周3");
break;
case 4:
System.out.println("周4");
break;
case 5:
System.out.println("周5");
break;
default:
System.out.println("不知道");
}
// switch(name){
// case "ww":
// System.out.println("周1");
// break;
// case "ee":
// System.out.println("周2");
// break;
//
// }
}
}