Java Reference
In-Depth Information
In the fragment, a superclass
catch
precedes a subclass
catch
. Since the superclass
catch
will catch all subclasses too, unreachable code is created.
Yes, an exception can be rethrown.
False? Explain your answer.
False. The
finally
block is the code executed when a
try
block ends.
All exceptions except those of type
RuntimeException
and
Error
must be declared
in a
throws
clause.
MyClass
does not extend
Throwable
. Only subclasses of
Throwable
can be thrown
by
throw
.
ceptions to your class that report stack full and stack empty conditions.