public class Demo6{
public int methodA(int money)throws Exception{
if(--money<=0)throw new Exception("Out of Money");
return money;
}
public int methodB(int money){
try {
return methodA(money);
} catch (Exception e) {
// TODO: handle exception
return -100;
}finally{
return 100;
}
}