一个另小弟我太疑惑的有关问题?求救~

一个另我太疑惑的问题???求救~~~
class InvalidDepositException extends Exception{
public InvalidDepositException(String reason){
System.out.println(reason);
}
}
class AccountOverdrawnException extends Exception{
public AccountOverdrawnException(String reason){
System.out.println(reason);

}
}
public class Account{
private String saversName;
private String account;
private double currentBalance=0;

public void saveMoney(double savemoney){



if(savemoney<0){
throw new InvalidDepositException("存钱的金额不能小于0元");
}
else{
this.currentBalance=savemoney;
System.out.println("你刚存了"+savemoney+"元钱");
}

}
public void pickMoney(double pickmoney){
if(pickmoney>currentBalance){
throw new AccountOverdrawnException("你要取的金额比帐户上的余额多");
}
else
System.out.println("你刚取了"+pickmoney+"元钱");

}
public void balanceInquiries(){
System.out.println("该用户当前余额为: "+currentBalance);

}


public static void main(String args[]){
Account account1=new Account();

 
account1.saveMoney(500);
account1.pickMoney(560);
account1.balanceInquiries();


}

}

编译结果出错为:未报告的异常InvalidDepositException;必须对其扑获或声明以便抛出;
  未报告的异常AccountOverdrawnException;必须对其扑获或声明以便抛出;



------解决方案--------------------
在方法体定义中,如果你要使用throw Exception这样的语法,那么你必须在方法定义时使用throws Exception语法,除非你要throw的Exception是RuntimeException类型.
所以呢你需要更改你的方法声明 ...
------解决方案--------------------
我编译完了,结果都出来了。


你刚存了500.0元钱
你要取的金额比帐户上的余额多
该用户当前余额为: 500.0