?? throwexception3.java
字號:
public class ThrowException3{
int x;
void throw1()throws ArithmeticException{
x=0;
x=3/x;
x=1;
System.out.println("x="+x);
}
public static void main(String[] args){
ThrowException3 c=new ThrowException3();
try{
c.throw1();
}catch(Exception e){
System.out.println("begin to catch exception");
System.out.println("get message="+e.getMessage());
}
System.out.println("program ends ok");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -