- What is Java exception hierarchy?
- What are two exception classes in hierarchy of Java exception class?
- What comes first in exception hierarchy?
What is Java exception hierarchy?
The class at the top of the exception class hierarchy is the Throwable class, which is a direct subclass of the Object class. Throwable has two direct subclasses - Exception and Error.
What are two exception classes in hierarchy of Java exception class?
Hierarchy of Java Exception classes
There are mainly two types of exceptions: checked and unchecked. An error is considered as the unchecked exception.
What comes first in exception hierarchy?
The Throwable class is at the top of the exception hierarchy following which are the subclasses-Error and Exception. Error and Exception should not be confused as same because there is a huge difference between these two classes.