case的這樣輸入也可以嗎?
public class HelloWorld{
public static void main(String[] args) {
char today='日';
switch (today) {
case '一':
case '三':
case '五':
System.out.println("今天早餐吃包子");
break;
case '日':
? ? ? ? ? ?System.out.println("今天吃主席套餐");
break;
default:
System.out.println("今天吃油條");
}
}
2016-03-28
可以的,我幫你試了一下!
2016-03-28
可以的
2016-03-28
可以的
2016-03-28
感覺會跳出循環。。最好的方法,就是去試試就知道 了。