JDK 7 has several enhancements to the try-catch construct. Try with resources allows for ensuring that resources are closed and freed up without the need to explicitly call the close function. Any class implementing java.lang.AutoCloseable can be automatically closed without the need for a finally section in the try block.
The syntax is a [...]