A simple little function, but it generates an error. Don't understand why when the same query works in MySQL Workbench:

```
public static String deleteDepartment(int deptId) throws ClassNotFoundException, SQLException {
    Connection conn = getMySQLConnection();
    String query = "DELETE FROM department WHERE id = ?";

    PreparedStatement ps = conn.prepareStatement(query);
    ps.setInt(1, deptId);

    ps.executeUpdate(query);

    ps.close();
    conn.close();

    return "success";
}

```

The error generated is:

```
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1

```

The query in the preparedStatement at .executeUpdate(), where 126 is a valid id:

```
DELETE FROM department WHERE id = 126

```

What am I not seeing here?