public static void breakSwitch2() {
- int n = 1;
- switch (n) {
- case 1:
- System.out.println("this is one.");
- //break;
- case 2:
- System.out.println("this is two.");
- break;
- default:
- System.out.println("Others.");
- }
- }
结果:
this is one.
this is two.
--错误,变量
while (int i>7)
{
i++;
System.out.println(i);
}
--