}
int Divide(int a,int b)throws ArithmeticException,DivisorIsMinusException...{
if(b<0)...{
throw new DivisorIsMinusException("Divisor cannot be minus!");
}
return a/b;
}
}
class MyChildException extends MyException...{
MyChildException()throws FileNotFoundException,DivisorIsMinusException...{ //而子类MyChildException的构造方法抛出FileNotFoundException,DivisorIsMinusException两个异常类
}
int Divide(int a,int b)throws ArithmeticException,DivisorIsMinusException...{
return a

