Here you can find the source of close(PreparedStatement stat)
public static void close(PreparedStatement stat)
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Main { public static void close(Connection conn) { try {//from w ww . j av a2 s . c o m if (null != conn) conn.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void close(ResultSet rs) { try { if (null != rs) rs.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void close(Statement stat) { try { if (null != stat) stat.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void close(PreparedStatement stat) { try { if (null != stat) stat.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }