public boolean equals(Object ob1) { User user = (User) ob1; return user.getUserName().equals(getUserName()) && user.getFirstName().equals(getFirstName()) && user.getMiddleName().equals(getMiddleName()) && user.getLastName().equals(getLastName()) && user.getUserId() == getUserId() && user.getGroupId() == getGroupId();
public boolean equals(Object obj) { if (obj == this) return true;  if (!(obj instanceof User)) return false;  User user = (User) obj; boolean result = true;
    public boolean equals(Object ob1) {        User user = (User) ob1;        return user.getUserName().equals(getUserName())                && user.getFirstName().equals(getFirstName())                && user.getMiddleName().equals(getMiddleName())                && user.getLastName().equals(getLastName())                && user.getUserId() == getUserId()                && user.getGroupId() == getGroupId();    }