The catch clause argument is always of type__________.
A.
Exception but NOT including RuntimeException
B.
Throwable
C.
RuntimeException
D.
CheckedException
E.
Error
F.
Exception
The catch clause argument is always of type__________.
The catch clause argument is always of type__________.
A.
Exception but NOT including RuntimeException
B.
Throwable
C.
RuntimeException
D.
CheckedException
E.
Error
F.
Exception
B
Answer: B
Explanation:
Because all exceptions in Java are the sub-class ofjava.lang.Exception class and this class extends Throwable you can have a single catch block that catches an exception of type Throwable.
However, using Throwable in a try catch is discouraged, because Throwable happens to also be the parent class for the non-application specific Error classes which are not meant to be handled explicitly as they are catered for by the JVM itself.