PreparedStatement ps = conn.prepareStatement(sql); int rows = ps.executeUpdate(); System.out.println("- " + sql + ": " + rows + " rows affected");
PreparedStatement ps = null; try { ps = conn.prepareStatement(sql); int rows = ps.executeUpdate(); System.out.println("- " + sql + ": " + rows + " rows affected"); } finally { if (ps != null) { ps.close(); } }
  private void execute(Connection conn, String sql, String verb)  throws SQLException  {    PreparedStatement ps = conn.prepareStatement(sql);    int rows = ps.executeUpdate();    System.out.println("- " + sql + ": " + rows + " rows affected");  }