Hierachy of Throwable Objects

All exceptions are derived from the Throwable class. There are two types of exceptions, checked and unchecked. Checked exceptions are those that the compiler forces you to handle or declare at compile time. An unchecked exception is like the ArrayIndexOutOfBoundsException where you can choose whether or not to handle it in your code.

The Throwable class provides the default implementation for several methods including the following ones:

  1. public Throwable(String message)
  2. public String getMessage()
  3. public void printStackTrace()
  4. public String toString()