Here you can find the source of execute(Connection conn, String string)
public static int execute(Connection conn, String string) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; public class Main { public static int execute(Connection conn, String string) throws SQLException { PreparedStatement st = conn.prepareStatement(string); try {//from ww w. j a v a 2s.c o m return st.executeUpdate(); } finally { st.close(); } } }