June 2017
Beginner
1296 pages
69h 23m
English
In this chapter you’ll:
Learn why exception handling is an effective mechanism for responding to runtime problems.
Use try blocks to delimit code in which exceptions might occur.
Use throw to indicate a problem.
Use catch blocks to specify exception handlers.
Learn when to use exception handling.
Understand the exception class hierarchy.
Use the finally block to release resources.
Chain exceptions by catching one exception and throwing another.
Create user-defined exceptions.
Use the debugging feature assert to state conditions that should be true at a particular point in a method.
Learn how try-with-resources can automatically release a resource when the try block terminates.