Courseiva
Question 303 of 513
Handling ExceptionseasyMultiple SelectObjective-mapped

1Z0-829 Handling Exceptions Practice Question

Which TWO statements about the try-with-resources statement are true? (Choose two.)

⚠ Common exam trap

Many exam-takers confuse the required interface (AutoCloseable vs. Closeable) and the separator between multiple resources (semicolons vs. commas), leading them to select the plausible-sounding but incorrect options A and E.

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

Resources declared in the try-with-resources block are closed automatically.

The try-with-resources statement automatically closes each resource declared in the resource specification after the try block completes, whether normally or abruptly. This is the primary purpose of the construct: to ensure reliable resource cleanup without requiring an explicit finally block.

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 resources must implement the Closeable interface.

    Why it's wrong here

    Incorrect: Resources must implement AutoCloseable, which is a superinterface of Closeable.

  • Resources can be reassigned inside the try block.

    Why it's wrong here

    Incorrect: Resources declared in try-with-resources are effectively final and cannot be reassigned.

  • Resources declared in the try-with-resources block are closed automatically.

    Why this is correct

    Correct: The try-with-resources statement ensures each resource is closed at the end of the statement.

  • Resources are closed in the reverse order of their declaration.

    Why this is correct

    Correct: Resources are closed in reverse order to avoid dependency issues.

  • Multiple resources are separated by commas.

    Why it's wrong here

    Incorrect: Multiple resources are separated by semicolons.

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 11, 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.