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