Introduced in Java 7, this syntax automatically closes resources like streams that implement AutoCloseable.
← Core Java theorytheory 0/50 · 0%
Fundamentals · hard
48. Try-with-resources
Automatic resource management.
Check your understanding
1. Keyword used?
2. Interfaces required?