###03.22_Java语言基础(选择结构switch语句练习)(掌握)
* A:看程序写结果:
*
int x = 2;
int y = 3;
switch(x){
default:
y++;
break;
case 3:
y++;
case 4:
y++;
}
System.out.println("y="+y);
* B:看程序写结果:
*
int x = 2;
int y = 3;
switch(x){
default:
y++;
case 3:
y++;
case 4:
y++;
}
System.out.println("y="+y);