Self-Review Exercises

13.1List five common examples of exceptions.
13.2Give several reasons why exception-handling techniques should not be used for conventional program control.
13.3Why are exceptions particularly appropriate for dealing with errors produced by methods of classes in the Java API?
13.4What is a “resource leak”?
13.5If no exceptions are thrown in a try block, where does control proceed to, when the try block completes execution?
13.6Give a key advantage of using catch( ExceptionexceptionName).
13.7Should a conventional application catch Error objects? Explain.
13.8What happens if no catch handler matches the type of a thrown object?
13.9What happens if several catch blocks match the type of the thrown object?
13.10Why would a programmer ...

Get Java™ How to Program, Seventh 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.