Here you can find the source of executeStatement(Connection connection, String query)
private static void executeStatement(Connection connection, String query)
//package com.java2s; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public class Main { private static void executeStatement(Connection connection, String query) { try {/*from w w w. j av a 2 s. c om*/ Statement statement = connection.createStatement(); statement.executeUpdate(query); statement.close(); } catch (SQLException sqle) { System.err.println("Failed to execute: " + query); System.err.println(sqle.getMessage()); } } }