case 可以這樣寫嗎?
public class HelloWorld {
? ? public static void main(String[] args) {
char today='日';
switch (today){
? ? case 1,3,5;
? ? ? ? ?System.out.printhln("吃面包");
? ? ? ? ?break;
? ? ? ? ?case 2,4,6;
? ? ? ? ?System.out.printhln("吃油條");
? ? ? ? ?break;
? ? ? ? ?default:
? ? ? ? ?System.out.println("主席套餐");
}
? ? ? ??
}
}
2015-06-11
這是啥 說不通啊
2015-06-11
不行,編譯就通不過