public class Application {
public static void main(String[] args) {
int a = 1;
int b = 0;
//Ctrl + Alt + T
try {
System.out.println(a/b);
} catch (Throwable e) {
e.printStackTrace();//打印错误的信息
} finally {
}
}
}
运行结果: