J.III · Java 25 practice question
A developer declares a non-generic interface Auditable with no extends clause. According to JLS SE 25, what is the direct supertype of Auditable?
Check answer and explanation
Correct answer: Object
Explanation
For a non-generic interface with no direct superinterface types, the type Object is its direct supertype.
Common trap
Even though an interface does not explicitly extend Object, JLS §4.10.2 defines Object as its direct supertype when it has no direct superinterfaces. Comparable is an ordinary library interface and is never an implicit supertype.
Source: JLS SE 25 §4.10.2. Subtyping among Class and Interface Types
Checked against the cited text on 2026-11-25.