Java Reference
In-Depth Information
11
Exceptions
CHAPTER OBJECTIVES
Discuss the purpose of exceptions.
Examine exception messages and the call stack trace.
Examine the try-catch statement for handling exceptions.
Explore the concept of exception propagation.
Describe the exception class hierarchy in the Java standard class library.
Explore I/O exceptions and the ability to write text files.
Create GUIs using mnemonics and tool tips.
Explore additional GUI components and containers.
E xception handling is an important part of an object-oriented soft-
ware system. Exceptions represent problems or unusual situations
that may occur in a program. Java provides various ways to handle
exceptions when they occur. We explore the class hierarchy from the
Java standard library used to define exceptions, as well as the ability
to define our own exception objects. This chapter also discusses the
use of exceptions when dealing with input and output, and examines
an example that writes a text file. The Graphics Track sections of
this chapter explore some special features of Swing components, as
well as a few additional components and containers.
537
 
 
Search WWH ::




Custom Search