public class SwitchTest {
public static void main(String[] args) {
int a = 2;
switch (a) {
case 1:
System.out.println("print 1");
break;
case 2:
case 3:
System.out.println("print 3");
break;
}
}
}
a 为多少会输出 print 3
2,3