?? userexceptiondemo1.java
字號(hào):
public class UserExceptionDemo1{
public static void main(String args[]){
int a,b;
try{
a=10;b=0;
int c=Divide(a,b);
System.out.println(a+"/"+b+"="+c);
}catch(ArithmeticException e){
System.out.println("Divided by zero error!");
}
System.out.println("After try-catch.");
}
static int Divide(int x,int y){
return x/y;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -