O'Reilly logo

The Java® Tutorial: A Short Course on the Basics, 6th Edition by Sharon Biocca Zakhour, Joni Gordon, Sowmya Kannan, Scott Hommel, Raymond Gallardo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. 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 to catch and handle exceptions. The discussion includes the try, catch, and 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required