Question 58 of 509
Handling ExceptionseasyMultiple SelectObjective-mapped

Quick Answer

The answer is that a finally block will not execute if the JVM exits before the finally block. This is true because the finally block is designed to run after a try block completes, but it cannot override an unconditional system exit, such as System.exit(), which immediately terminates the JVM and halts all execution. In the Oracle Certified Professional Java SE 17 Developer 1Z0-829 exam, this concept tests your understanding of the absolute limits of exception handling basic facts, often appearing in multi-select questions where you must distinguish between guaranteed and conditional execution. A common trap is assuming finally always runs, but it fails to execute in two specific cases: when the JVM exits or when the thread is killed. Another true statement is that multi-catch syntax allows a single catch block to handle multiple exception types using the pipe symbol (|), reducing code duplication. For the exam, remember the memory tip: “Finally fails on exit, not on exception.”

1Z0-829 Handling Exceptions Practice Question

This 1Z0-829 practice question tests your understanding of handling exceptions. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

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

Question 1easymulti select
Full question →

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

Multi-catch syntax uses the pipe symbol (|) between exception types.

Option C is correct because Java's multi-catch syntax allows a single catch block to handle multiple exception types by separating them with the pipe symbol (|). This reduces code duplication when different exceptions require the same handling logic.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

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 variable in a catch clause is effectively final only when using multi-catch syntax.

    Why it's wrong here

    In single catch, it can be reassigned.

  • A finally block is mandatory in a try-with-resources statement.

    Why it's wrong here

    Finally is optional.

  • Multi-catch syntax uses the pipe symbol (|) between exception types.

    Why this is correct

    Correct syntax.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Checked exceptions must be handled or declared in the throws clause.

    Why this is correct

    Checked exceptions requirement.

    Related concept

    Read the scenario before looking for a memorised answer.

  • A finally block will not execute if the JVM exits before the finally block.

    Why this is correct

    if System.exit() is called.

    Related concept

    Read the scenario before looking for a memorised answer.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse the 'effectively final' concept with multi-catch syntax, incorrectly thinking that only multi-catch variables are effectively final, when in fact all catch clause variables are implicitly final in Java.

Detailed technical explanation

How to think about this question

Under the hood, the compiler translates multi-catch blocks into multiple catch blocks in bytecode, each handling one exception type, but the source code remains concise. A subtle behavior is that the exception variable in a multi-catch clause is implicitly final, meaning you cannot reassign it, which prevents accidental loss of the original exception reference. In real-world scenarios, multi-catch is particularly useful when handling I/O exceptions like IOException and SQLException together, as both may require the same cleanup logic.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the 1Z0-829 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related 1Z0-829 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free 1Z0-829 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this 1Z0-829 question test?

Handling Exceptions — This question tests Handling Exceptions — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Multi-catch syntax uses the pipe symbol (|) between exception types. — Option C is correct because Java's multi-catch syntax allows a single catch block to handle multiple exception types by separating them with the pipe symbol (|). This reduces code duplication when different exceptions require the same handling logic.

What should I do if I get this 1Z0-829 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 25, 2026

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.

Loading comments…

Sign in to join the discussion.

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.