Here you can find the source of close(Connection conn, Statement st, ResultSet rs)
private static void close(Connection conn, Statement st, ResultSet rs)
//package com.java2s; import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; public class Main { private static void close(Connection conn, Statement st, ResultSet rs) { try {//from w ww . ja va2s . c om if (rs != null) { rs.close(); } if (st != null) { st.close(); } if (conn != null) { conn.close(); } } catch (Exception e) { e.printStackTrace(); } } }