异常
异常分类
异常的体系结构
Error 错误
Exception 异常
package exception;
public class Demo01 {
public static void main(String[] args) {
// new Demo01().a(); //Exception in thread "main" java.lang.StackOverflowError
System.out.println(11/0);//Exception in thread "main" java.lang.ArithmeticException: / by zero
}
public void a() {
b();
}
public void b() {
a();
}
}