1Z0-829 Handling Exceptions Practice Question
A method catches multiple exceptions using a multi-catch clause. Which statement about the exceptions in a multi-catch clause is correct?
⚠ Common exam trap
Test-takers frequently confuse multi-catch with single-catch ordering rules, assuming that the order of exceptions in a multi-catch clause matters for handling, when in fact the compiler enforces disjointness and order is irrelevant within a single multi-catch block.
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
✓
The exceptions must be disjoint; if one is a subclass of another, the code will not compile.
Java requires that exception types in a multi-catch clause be disjoint (i.e., not in a subclass/superclass relationship). If one exception is a subclass of another, the code will not compile because the catch block would be unreachable for the subclass exception, violating the rule that catch blocks must be ordered from most specific to most general. This ensures that the multi-catch clause is unambiguous and that each exception type is distinct.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The exceptions must be disjoint; if one is a subclass of another, the code will not compile.
Why this is correct
Subclass relationship makes one unreachable, causing compile error.
- ✗
All exceptions in a multi-catch must be unchecked exceptions.
Why it's wrong here
Checked and unchecked can be combined.
- ✗
The multi-catch clause can have up to three exception types.
Why it's wrong here
No limit defined, but practical limitations exist.
- ✗
The exceptions can be in any order, and the first matching catch handles the exception.
Why it's wrong here
Order does not matter in multi-catch; compilation fails if they are not disjoint.
Go deeper
Related to this question
About these practice questions
This 1Z0-829 question is part of Courseiva's 513-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-829 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-829 exam.