Module 8: Exception Handling and Debugging
Try-with-Resources & AutoCloseable
Automatically manage streams, files, and other closable resources.
Any class implementing AutoCloseable can participate in try-with-resources; the JVM ensures close() executes.
Declare multiple resources in one statement to handle complex workflows cleanly.
Understand suppressed exceptions: if both the try block and close throw, the close exception becomes suppressed.