y不应该等于4吗? CASE 4:也执行吗? switch(x) 和 case 4 不匹配吗 也执行!?
public class ErWei222{
public static void main(String[] args){
int x = 2,y=3;
switch(x)
{
default:
y++;
case 3:
y++;
break;
case 4:
y++;
}
System.out.println("y="+y);
}
}
慕尼黑的夜晚无繁华
杨__羊羊
至尊宝的传说
随时随地看视频慕课网APP