Question 208 of 513
1Z0-829 Handling Exceptions Practice Question
What happens when a finally block throws an exception?
⚠ Common exam trap
It's easy for candidates to assume both exceptions are lost or that the try-block exception always propagates, but the Java Language Specification mandates that the finally-block exception takes precedence, with the try-block exception being suppressed.
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 exception from the try block is suppressed and the finally exception is reported.
When a finally block throws an exception, the JVM suppresses the exception that was thrown from the try block (if any) and propagates the exception thrown from the finally block. This behavior is defined in the Java Language Specification (JLS §14.20.2) and ensures that the finally block's exception takes precedence, as the finally block is executed after the try block completes abruptly.
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 JVM logs both exceptions and then terminates the thread.
Why it's wrong here
Only one exception propagates; the other is lost.
- ✗
The exception from the try block is propagated and the finally exception is ignored.
Why it's wrong here
Actually, the finally exception overrides the try exception.
- ✗
Both exceptions are reported as suppressed exceptions of a new exception.
Why it's wrong here
That happens with try-with-resources, not with finally.
- ✓
The exception from the try block is suppressed and the finally exception is reported.
Why this is correct
The exception from finally takes precedence, the try exception is lost unless caught as suppressed.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 25, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.