public class g{
public static void main(String [] args){
for(int x = 1; x <17; x +=3){
switch(x){
case -1: case 0: case 1:
System.out.print("Breeze");
case 2: System.out.print("Easy");
case 3:
case 4: System.out.print("As"); break;
case 5: System.out.print("Pie"); break;
case 6: case 7: System.out.print("No");
case 8: System.out.print("Problem");
case 9: break;
case 10: System.out.print("Like");
case 12: System.out.print("Nothing"); break;
case 13:
case 14: System.out.print("phew"); break;
}
System.out.println();
}
}
}
为什么它会打印出
BreezeEasyAs
As
NoProblem
LikeNothing
phew
我认为它会在每个之后打印默认值,就像在第一个 Breezephew 中一样