Lecture 21
10
Keyword throws – lawyers at work
•public int withdraw( int amount )
•  throws InsufficientFundsException
•{
•   incrementBalance( -amount );
•}
•Since withdraw might see an InsufficientFundsException thrown by incrementBalance it must either
–catch it // it doesn’t
–or declare its intention to throw it on up the stack to its caller by asserting                                                        throws InsufficientFUndsException
•