关于switch语句的
这段程序的输出为什么是 Value is two.
Value is three.
怎么不是 Value is two.
Value is 2
public class SwitchTest
{
public static void main(String[] args)
{
int j = 2;
switch ( j )
{
case 2:
System.out.println("Value is two.");
case 10:
System.out.println("Value is three.");
break;
default:
System.out.println("Value is " + j);
break;
}
}
}