Here you can find the source of close(ResultSet rs, PreparedStatement pstmt, Connection con)
public static void close(ResultSet rs, PreparedStatement pstmt, Connection con)
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; public class Main { public static void close(ResultSet rs, PreparedStatement pstmt, Connection con) { try {/*from www. j av a2 s. com*/ if (rs != null) rs.close(); if (pstmt != null) pstmt.close(); if (con != null) con.close(); } catch (Throwable e) { e.printStackTrace(); } } }