2011年JAVA认证模拟题(28)
Q82 What is wrong with the following switch statement? switch(i == 10) {case ‘1’:
++i;
break;
case “2”:
--i;
case 3:
i *= 5;
break;
default:
i %=3;
}
A The switch expression must evaluate to an integer value.
B The first case specifies a char value.
C The second case specifies a String value.
D There is a break statement missing in the second case.
Q83 What’s wrong with the following code?
public class Question {
2011年JAVA认证模拟题(28)
</p> public static void main(String args[]){
Boolean b = new Boolean(“TRUE”);
if(b) {
for(Integer i=0; i
页:
[1]