Here you can find the source of dropTable(Connection con, String table)
public static void dropTable(Connection con, String table) throws SQLException
//package com.java2s; /*// ww w. java2 s. c o m * Copyright (c) 2004, PostgreSQL Global Development Group * See the LICENSE file in the project root for more information. */ import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; public class Main { public static void dropTable(Connection con, String table) throws SQLException { Statement stmt = con.createStatement(); try { String sql = "DROP TABLE " + table + " CASCADE "; stmt.executeUpdate(sql); } catch (SQLException ex) { // Since every create table issues a drop table // it's easy to get a table doesn't exist error. // we want to ignore these, but if we're in a // transaction then we've got trouble if (!con.getAutoCommit()) { throw ex; } } } }