Given a class named User that represents users on a web site. The class overrides the equals method using the id field.
class User {
private long id;
private String name;
// constructor, getters and setters
@Override
public boolean equals(Object obj) {
if (this == obj) {
return false;
}
if (obj != null && !(obj instanceof User)) {
return false;
}
User user = (User) obj;
return id == user.id;
}
// overridden hashCode() method
}Select all restrictions that are not satisfied.