Which TWO statements about the try-with-resources statement are true? (Choose two.)
Correct: The try-with-resources statement ensures each resource is closed at the end of the statement.
Why this answer
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.
Exam trap
The trap here is that candidates often 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.