当前位置: 技术问答>java相关
switch问题一个??
来源: 互联网 发布时间:2015-03-08
本文导语: You have the following code. Which numbers will cause "Test3" to be printed? switch(x){ case 1: System.out.println("Test1"); case 2: System.out.println("Test2"); case 4: System.out.println("Test4"); case 3: System.out.println("Test3"); break; } } A. 0 B. 1 C. 2 D...
You have the following code. Which numbers will cause "Test3" to be
printed?
switch(x){
case 1: System.out.println("Test1");
case 2: System.out.println("Test2");
case 4: System.out.println("Test4");
case 3: System.out.println("Test3");
break;
}
}
A. 0
B. 1
C. 2
D. 3
E. 4
printed?
switch(x){
case 1: System.out.println("Test1");
case 2: System.out.println("Test2");
case 4: System.out.println("Test4");
case 3: System.out.println("Test3");
break;
}
}
A. 0
B. 1
C. 2
D. 3
E. 4
|
错了,B, C, D, E...
A 要找default 的
A 要找default 的
|
看错了,应该是b,c,d,e吧
|
B, C, D, E
|
同意B C D E
|
b,c,d,e
|
B, C, D, E