title: Try-with-resources equivalent in Java 1.6
body: <p>I have the following code: </p>
  
  <pre><code>    public class Main {
  
          public static void main(String[] args) throws SQLException {
  
              try (
                      Connection conn = DBUtil.getConnection(DBType.HSQLDB);
                      Statement stmt = conn.createStatement(
                              ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                      ResultSet rs = stmt.executeQuery("SELECT * FROM tours");
                      ) {
  
              DBUtil.getConnection();
  
              } catch (SQLException e) {
                  DBUtil.processException(e);
              } 
  
          }
  
      }
  </code></pre>
  
  <p>I use this code to fetch data from a database. My problem is that I'm not allowed to use the Java 1.7 compiler and have to use 1.6.
  How can I translate the try-with-resources-code to use with a 1.6 compiler?
  What exactly happens in this special try block?</p>