Hierarchy of Exceptions in Java

All classes of exceptions are subtypes of the java.lang.exception class. This class is a subclass of the Throwable class. Other than the exception class, there is an alternate subclass called Error which is gotten from the Throwable class. These special case scenarios are not ordinarily caught by the Java programs. These conditions ordinarily happen if alternate scenarios are not taken care of by the java programs. Errors are produced to demonstrate lapses created by the runtime environment. A sample exception is: Out of Memory or Stack Overflow. The Exception class has two primary subclasses:

IOException and RuntimeException Classes.


For any query or issue, feel free to discuss on http://discuss.eduguru.in