Answers to Self-Review Exercises

11.1 Memory exhaustion, array index out of bounds, arithmetic overflow, division by zero, in-valid method parameters.

11.2 It’s unlikely that methods of classes in the Java API could perform error processing that would meet the unique needs of all users.

11.3 A “resource leak” occurs when an executing program does not properly release a resource when it’s no longer needed.

11.4 The catch blocks for that try statement are skipped, and the program resumes execution after the last catch block. If there’s a finally block, it’s executed first; then the program resumes execution after the finally block.

11.5 The form catch(Exception exceptionName) catches any type of exception thrown in a try block. An advantage is ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.