JDBC 4.1

JDBC 4.1, which is part of Java SE 7, introduces the following
features:

The ability to use a try-with-resources statement
to automatically close resources of type Connection,
ResultSet, and Statement

RowSet 1.1: The introduction of the RowSetFactory
interface and the RowSetProvider class, which enable
you to create all types of row sets supported by your JDBC
driver.

Using try-with-resources Statements to Automatically Close JDBC
Resources

You can use a try-with-resources statement to
automatically close java.sql.Connection,
java.sql.Statement, and
java.sql.ResultSet objects, regardless of whether a
SQLException or any other exception has been thrown. A
try-with-resources statement consists of a
try statement and one or more declared resources
(which are separated by semicolons).