?? switchdemo.java
字號:
class SwitchDemo
{
public static void main(String args[])
{
char c;
System.out.println("請輸入數字:");
c = (char)System.in.read();
switch( c )
{
case 0:
System.out.println("測試輸入0");
break;
case 1:
System.out.println("測試輸入1");
break;
case 2:
System.out.println("測試輸入2");
break;
case 3:
System.out.println("測試輸入3");
break;
default:
System.out.println("輸入的字符不在0-3之間");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -