1Z0-811 Exception Handling and Development Tools Practice Question
Exhibit
public class InvalidInputException extends Exception {
public InvalidInputException(String message) {
super(message);
}
}Refer to the exhibit. Which statement is true about the InvalidInputException class?
⚠ Common exam trap
Oracle often tests whether candidates confuse checked and unchecked exceptions by presenting a custom exception class that extends Exception (checked) but looks like it might be unchecked because of its name or usage context.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
It is a checked exception.
The InvalidInputException class extends Exception, which makes it a checked exception. Checked exceptions must be either caught or declared in the method signature using 'throws', otherwise the code will not compile. This is the core reason why option B is correct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It cannot be thrown by a method.
Why it's wrong here
Checked exceptions can be thrown.
- ✓
It is a checked exception.
Why this is correct
Extending Exception (not RuntimeException) creates a checked exception.
- ✗
It is an unchecked exception.
Why it's wrong here
Unchecked exceptions extend RuntimeException.
- ✗
It can only be caught in a finally block.
Why it's wrong here
It can be caught in a catch block.
Go deeper
Related to this question
About these practice questions
This 1Z0-811 question is part of Courseiva's 481-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.