为什么错误
switch (today){ case '一': case '三': case '五': System.out.println("吃包子"); break; case '二': case '四': case '六': System.out.println("吃油条"); break; default: System.out.println("吃主席套餐"); } } } 这个为什么过不去啊 明明结果正确啊
switch (today){ case '一': case '三': case '五': System.out.println("吃包子"); break; case '二': case '四': case '六': System.out.println("吃油条"); break; default: System.out.println("吃主席套餐"); } } } 这个为什么过不去啊 明明结果正确啊
2015-12-11
public class HelloWorld {
public static void main(String[] args) {
String today='日';
switch(today){
case '一':
case '三':
case '五': System.out.println("吃包子");break;
case '二':
case '四':
case '六':System.out.println("吃油条");break;
case '日':System.out.println(" 吃主席套餐");break;
default : break;
}
}
}
我的也是过不了,你过了吗?
举报