Here you can find the source of close(Object obj)
private static void close(Object obj)
//package com.java2s; import java.sql.PreparedStatement; import java.sql.ResultSet; public class Main { private static void close(Object obj) { if (obj instanceof ResultSet) { try { ((ResultSet) obj).close(); } catch (Exception e) { }/*from w ww.j a v a2 s.c om*/ } if (obj instanceof PreparedStatement) { try { ((PreparedStatement) obj).close(); } catch (Exception e) { } } } }