RSS
热门关键字:  java  Ajax  JSP  JSF  Struts
当前位置 : 首页>Java>列表

Java第三课

来源: 作者: 时间:2007-08-24 点击:
//父类MyException的构造方法抛出ArithmeticException异常类
}

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

上一篇:java第二课
下一篇:Java第四课
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
Google Adsense
相关文章