?? exceptiondemo.java
字號:
//ExceptionDemo.java
public class ExceptionDemo {
public static void main(String[ ] args) {
int i=0;
try {
i = Integer.parseInt(args[0]);
// possible ArithmeticException
}
catch (NumberFormatException e) {
// print an error message
System.err.println("Usage: java HelloThere repeat_count" );
return;
}
catch (ArrayIndexOutOfBoundsException e) {
// pick a default value
System.out.println("ArrayIndexOutOfBoundsException");
i = 2;
}
for (int a = 0; a<i; a++) {
System.out.println("Hello");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -