我正在阅读课堂上朋友的笔记,我想知道以下代码评论中问题的答案是什么?
public void withdraw(double amount) {
if (amount > balance) {
IllegalArgumentException exception1 = new IllegalArgumentException("Amount exceeds balance");
throw exception1; //where caught??
}
balance = balance - amount;
}