Sunday, December 14, 2008

Exception Types

All exception types are subclasses of the built-in class Throw able. Thus throw able is at the top of the exception class hierarchy. Immediately below throw able are two subclasses that partition exceptions into two distinct branches. One branch is headed by Exception. This class is used for exceptional conditions that user programs should catch. This is also the class that you will subclass to create your own custom exception types. There is an important subclass of exception, called Run time Exception. Exceptions of this type are automatically defined for the programs and include things such as division by zero and invalid array indexing.

0 comments: