exception - Where does Java language define if a Throwable is checked or not? -
both exception , runtimeexception inherits throwable , not implement interface tell whether checkd or not.
where specified exception checked , runtimeexception unchecked? hardwired in language or jvm?
it's defined in java language specification section 11.1.1.
throwable
, subclasses are, collectively, exception classes.
exception
superclass of exceptions ordinary programs may wish recover.
error
superclass of exceptions ordinary programs not ordinarily expected recover.
error
, subclasses are, collectively, error classes.[...]
the class
runtimeexception
direct subclass ofexception
.runtimeexception
superclass of exceptions may thrown many reasons during expression evaluation, recovery may still possible.
runtimeexception
, subclasses are, collectively, run-time exception classes.the unchecked exception classes run-time exception classes , error classes.
the checked exception classes exception classes other unchecked exception classes. is, checked exception classes subclasses of
throwable
otherruntimeexception
, subclasses ,error
, subclasses.
Comments
Post a Comment