package exception;
public class demo01 {
public static void main(String[] args) {
new demo01().a();
}
public void a(){
b();
}
public void b(){
a();
}
}
package exception.demo02;
public class MyException extends Exception {
//传递数字>10
private int detail;
public MyException(int a){
this.detail = a;
}
//toString :异常的打印信息
public String toString(){
return "Myexception{"+ detail +'}';
}
}
}
}