摘要:
public class Test{ public static void main(String[] args) { String test = "yes";//no try{ System.out.println("start try"); doRisky(test);//若在此处抛出异常,后面 阅读全文
摘要:
class AddException extends Exception{ //声明异常类 String message; public AddException(int m,int n){ message=m+"是负数或"+n+"是负数或"+m+n+"是负数,不符合要求。"; } public S 阅读全文
摘要:
class Bank{ int saveMoney; int year; double interest; public double computerInterest(){ interest = year * 0.035 * saveMoney; return interest; } } clas 阅读全文