Here you can find the source of delete(Connection conn, String table, Serializable id)
public static boolean delete(Connection conn, String table, Serializable id)
//package com.java2s; //License from project: Open Source License import java.io.Serializable; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public class Main { public static boolean delete(Connection conn, String table, Serializable id) { int ret = 0; try {// w w w . j a va 2 s . c om Statement statement = conn.createStatement(); String sql = String.format("DELETE FROM %s WHERE id = %s;", table, id); ret = statement.executeUpdate(sql); statement.close(); } catch (SQLException e) { e.printStackTrace(); } return ret != 0; } }