Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Exception Class Hierarchy

Java Exception Class Hierarchyfooter line

 

Following is the hierarchy of the Java Exception Classes:

  • In Java, the throwable class is the parent class of all exception classes.
  • There are two child classes in the throwable class, i.e., Error and Exception.
  • The Exception class represents exceptions that the programmer can handle using the try-catch block.
  • RuntimeException is a class that is a subclass of the Exception class and comprises the majority of the unchecked exceptions. Unchecked Exceptions include ArithmeticException, NullPointerException, NumberFormatException, etc.