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 to catch and handle exceptions. The discussion includes the
finally blocks. The fourth section covers how to specify the exceptions thrown by a method. The fifth section covers how to throw exception, how to chain exceptions, and how to create an exception class. The sixth ...