public class Switchtest
{
int i=0,w=0;
public Switchtest()
{
for(;i<=5;i++)
{
switch(i)
{case 3:w+=1;
case 0:w+=1;
case 1:w+=1;continue;
case 2:w+=1;
case 4:w+=1;
default:w+=2;
}
System.out.println(" "+w);
}
}
public static void main(String []args)
{
Switchtest stest=new Switchtest();
}
}
运行出来是 7 13 15
想知道 具体的思路~谢谢
蓝山帝景
当年话下
慕尼黑8549860