package edu.xucd;
public class Demo01 {
public static void main(String[] args) {
int divisor=10;
int dividend=0;
try {//试着执行代码块内容
System.out.println(divisor/dividend);//ArithmeticException算数异常
}catch (Exception e){//捕获异常
e.printStackTrace();
System.out.println("程序捕获到了相应的异常");
}finally {
System.out.println("不管有没有出错,都会继续执行");
}
System.out.println(divisor/dividend);
System.out.println("我是后续的内容");
}
}