Java OCA OCP Practice Question 1343

Question

Which of the following Throwable types is it recommended not to catch in a Java application?

A.  Error 
B.  CheckedException 
C.  Exception 
D.  RuntimeException 


A.

Note

Exception and RuntimeException are commonly caught in Java applications.

It is recommended Error not be caught.

An Error often indicates a failure of the JVM which cannot be recovered from.

Option A is correct.

Options C and D are incorrect.

Option B is not a class defined in the Java API; therefore, it is also incorrect.




PreviousNext

Related