Question:

Which of the following is the superclass of all exceptions in Java?

Show Hint

Remember the Java exception hierarchy: `Object` -> `Throwable` -> (`Error` and `Exception`). All things that can be "thrown" must be a `Throwable`.
Updated On: Jul 2, 2026
  • Error
  • Throwable
  • ArthimeticException
  • Exception
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

In Java, the exception handling mechanism is built around a class hierarchy.
At the top of this hierarchy is the `Throwable` class, which is a direct subclass of `Object`. Only objects that are instances of the `Throwable` class (or one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java `throw` statement.
The `Throwable` class has two direct subclasses:
1. `Error`: Represents serious problems that a reasonable application should not try to catch, such as `OutOfMemoryError` or `StackOverflowError`. 2. `Exception`: Represents conditions that a reasonable application might want to catch. The `Exception` class itself has many subclasses, including `RuntimeException` (for unchecked exceptions like `NullPointerException`) and other checked exceptions (like `IOException`).
Since both `Error` and `Exception` (and all their subclasses, including `ArithmeticException`) inherit from `Throwable`, the `Throwable` class is the superclass of all errors and exceptions in Java.
Was this answer helpful?
0
0