Junior — Middle
On which class is the Exception class based?
sobes.tech AI
Answer from AI
In Java, the Exception class inherits from the Throwable class. The hierarchy looks like this:
java.lang.Object
└─ java.lang.Throwable
├─ java.lang.Error
└─ java.lang.Exception
Thus, Exception is based on the Throwable class, which is the superclass for all errors and exceptions in Java.