Here you can find the source of close(Connection connection, Statement statement, ResultSet resultSet)
private static void close(Connection connection, Statement statement, ResultSet resultSet) throws SQLException
//package com.java2s; //License from project: Open Source License import java.sql.*; public class Main { private static void close(Connection connection, Statement statement, ResultSet resultSet) throws SQLException { if (resultSet != null) { resultSet.close();/*from w ww.j a v a 2s.com*/ } if (statement != null) { statement.close(); } if (connection != null) { connection.close(); } } private void close(Statement statement, ResultSet resultSet) throws SQLException { close(null, statement, resultSet); } }