Loading…
Loading…
Ten exam-style questions on try-with-resources: AutoCloseable and Closeable, resource declaration syntax, effectively final resources, scope, closing order relative to catch and finally, suppressed exceptions and failing resources, with explanations.
Practice questions for the article Java try-with-resources: AutoCloseable, Closing Order and Suppressed Exceptions.
Number the events in order: open, body, close in reverse, catch, finally. Aim for at least 8 out of 10.
Quiz path: step 79. Take the quizzes in this order, after reading each article.
Previous quiz: try, catch, multi-catch and finally (OCP 21)
Next quiz: Formatting Numbers and Dates (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.