9. Exceptions

The Java programming language uses exceptions to handle errors and other exceptional events. This chapter describes when and how to use exceptions.

The first section defines an exception. An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions. The second section discusses the catch or specify requirement and describes the three kinds of exceptions. The third section covers how ...

Get The Java® Tutorial: A Short Course on the Basics, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.