J.V · Java 25 practice question
A developer is inspecting the Java exception hierarchy to build a custom error-reporting utility. Which class is the direct superclass of Throwable?
Check answer and explanation
Correct answer: Object
Explanation
In Java, Throwable directly extends Object, and Throwable together with all of its subclasses form the exception classes.
Common trap
Exception is a direct subclass of Throwable, not its superclass. RuntimeException is a subclass of Exception, sitting two levels below Throwable.
Source: JLS SE 25 §11.1.1. The Kinds of Exceptions
Checked against the cited text on 2026-11-25.