code: public int update(Connection conn, String sql, Object[] params, int[] paramTypes)
          throws SQLException {
  
          if ((paramTypes != null) && params.length != paramTypes.length) {
              throw new IllegalArgumentException("Sizes of params and paramTypes must be equal!");
          }
  
          PreparedStatement stmt = null;
          int rows = 0;
  
          try {
              stmt = this.prepareStatement(conn, sql);
              this.fillStatement(stmt, params, paramTypes);
              rows = stmt.executeUpdate();
  
          } catch (SQLException e) {
              this.rethrow(e, sql, params);
  
          } finally {
              close(stmt);
          }
  
          return rows;
      }
docs: Execute an SQL INSERT, UPDATE, or DELETE query.
  
  @param conn The connection to use to run the query.
  @param sql The SQL to execute.
  @param params The query replacement parameters.
  @param paramTypes The query replacement parameters.
  @return The number of rows updated.
  @throws java.sql.SQLException if a database access error occurs