Here you can find the source of close(PreparedStatement preparedStatement)
public static void close(PreparedStatement preparedStatement) throws SQLException
//package com.java2s; import java.sql.CallableStatement; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class Main { public static void close(CallableStatement callableStatement) throws SQLException { close(callableStatement, null, null, null); }/* www .ja v a 2 s . c o m*/ public static void close(CallableStatement callableStatement, ResultSet resultSet) throws SQLException { close(callableStatement, null, null, resultSet); } public static void close(PreparedStatement preparedStatement) throws SQLException { close(null, preparedStatement, null, null); } public static void close(PreparedStatement preparedStatement, ResultSet resultSet) throws SQLException { close(null, preparedStatement, null, resultSet); } public static void close(Statement statement) throws SQLException { close(null, null, statement, null); } public static void close(Statement statement, ResultSet resultSet) throws SQLException { close(null, null, statement, resultSet); } public static void close(CallableStatement callableStatement, PreparedStatement preparedStatement, Statement statement, ResultSet resultSet) throws SQLException { if (resultSet != null) { resultSet.close(); } if (callableStatement != null) { callableStatement.close(); } if (preparedStatement != null) { preparedStatement.close(); } if (statement != null) { statement.close(); } } }