public class HelloWorld {
public static void main(String[] args) {
String today="周日";
switch(today){
case "周一":
case "周三":
case "周五":
System.out.println("吃包子");
case "周日":
System.out.println("吃主席套餐");
default:
System.out.println("吃油条");
}
}
}
没用break
要用break跳出上一个循环
没加break;