Try with Resource Example – Java 7 Feature for automatic resource management | JournalDev
One of the Java 7 features is try-with-resources statement for automatic resource management. A resource is an object that must be closed once your program is done using it, like a File resource or JDBC resource for database connection or a Socket connect...