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.
exceptionsuperclass of exceptions ordinary programs may wish recover.
errorsuperclass of exceptions ordinary programs not ordinarily expected recover.
error, subclasses are, collectively, error classes.[...]
the class
runtimeexceptiondirect subclass ofexception.runtimeexceptionsuperclass 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
throwableotherruntimeexception, subclasses ,error, subclasses.
Comments
Post a Comment