12345678910111213141516171819202122232425262728293031323334353637 |
- class TestSwitch01
- {
- public static void main(String[] args)
- {
-
-
- String m = "苹果";
-
- switch(m){
- default:
- System.out.println("面头");
-
- case "面条":
- System.out.println("面条");
-
- case "米饭":
- System.out.println("米饭");
- break;
- case "米线":
- System.out.println("面条");
- break;
-
- }
-
-
-
-
-
-
- }
- }
|