12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import java.util.*;
- class TestSwitch02
- {
- public static void main(String[] args)
- {
-
- Scanner sc = new Scanner(System.in);
-
- System.out.println("输入数字123");
-
- int number = sc.nextInt();
-
-
-
- switch(number){
- case 1:
- System.out.println("one");
- break;
- case 2:
- System.out.println("two");
- break;
- case 3:
- System.out.println("three");
- break;
- default:
- System.out.println("error");
- break;
-
- }
-
- sc.close();
-
-
-
-
- }
- }
|