public class Test1 {标签:int,代码,System,异常,public,oppdemo12 From: https://www.cnblogs.com/123jgh/p/16787336.html
public static void main(String[] args) {
int a = 2;
int b = 0;
//选择该代码(sout)后 Ctrl + Alt + T 即可选择代码块
try {
System.out.println(a/b);
} catch (Exception e) {
System.exit(0);//手动结束程序
throw new RuntimeException(e);//打印错误的栈信息
} finally {
}
}
}