Here you can find the source of close(final ResultSet rs, final Statement st)
public static void close(final ResultSet rs, final Statement st)
//package com.java2s; /**/*w ww .j av a 2 s . c o m*/ * JDBCPersistence framework for java * Copyright (C) 2004-2014 Alex Rojkov * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact me by email jdbcpersistence a t gmail d o t com * */ import java.sql.*; public class Main { public static void close(final ResultSet rs, final Statement st) { /* System.out.println("SQLUtils.close----------------------------"); new Exception().printStackTrace(); */ if (rs != null) { try { rs.close(); } catch (Throwable e) { e.printStackTrace(); } } if (st != null) { try { st.close(); } catch (Throwable e) { e.printStackTrace(); } } } }