Here you can find the source of execute(String sql, Connection connection)
public static void execute(String sql, Connection connection)
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public class Main { public static void execute(String sql, Connection connection) { Statement shutdown = null; try {/* w w w . j a va2s .c om*/ shutdown = connection.createStatement(); shutdown.execute(sql); } catch (SQLException sqle) { throw new RuntimeException(String.format("Failed to execute SQL [%s]", sql), sqle); } finally { if (shutdown != null) { try { shutdown.close(); } catch (SQLException e) { } } } } }