1Z0-808 practice question 3 of 30

Which three statements are true about exception handling? (Choose three.)

Full set: 224 questions
Answer options
A: Only unchecked exceptions can be rethrown.
B: All subclasses of the RuntimeException class are not recoverable.
C: The parameter in a catch block is of Throwable type. Correct answer
D: All subclasses of the RuntimeException class must be caught or declared to be thrown.
E: All subclasses of the RuntimeException class are unchecked exceptions. Correct answer
F: All subclasses of the Error class are not recoverable. Correct answer
Correct Answer:
C. The parameter in a catch block is of Throwable type.; E. All subclasses of the RuntimeException class are unchecked exceptions.; F. All subclasses of the Error class are not recoverable.
Explanation

Statement E is true by definition: RuntimeException and its subclasses are categorized as unchecked exceptions in Java.
Statement F is true by convention and design. Error and its subclasses represent serious, abnormal conditions (like OutOfMemoryError) that a typical application should not try to handle or recover from.
Statement C is true because the parameter of a catch block must be of a type that is a subclass of java.lang.Throwable. Therefore, any exception object caught is an instance of Throwable.

Why Incorrect

A. This is false. Both checked and unchecked exceptions can be caught and rethrown.
B. This is false. While RuntimeExceptions often indicate programming errors, they can be caught and the application can attempt to recover. "Not recoverable" is too strong a statement.
D. This is false. This describes checked exceptions. Unchecked exceptions, which include all subclasses of RuntimeException, do not need to be caught or declared.

References

1. The Java™ Tutorials, "The Catch or Specify Requirement". It states, "The second kind of exceptions are unchecked exceptions... This includes RuntimeExceptions and Errors." This supports option E and contradicts D.

2. Oracle Java Documentation, java.lang.Error class Javadoc. It states, "An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch." This supports option F.

3. The Java® Language Specification, Java SE 8 Edition, Section 14.20, "The try statement". It specifies that the CatchParameter type in a catch clause must be a subtype of Throwable. This supports option C.

Scroll to Top