I am trying to override the toEquals method for a pojo. However I am not sure how I am able to compare the parent class attributes since super() is throwing me an error.
I am trying something like this:
@Override
public boolean equals(Object o) {
return super.equals(o.super()); // it mentions that the abstract parent class is not an inner class
}
how do I compare the parent abstract class fields for equality as well? There is a chance that the child attributes are similar, but the parent attributes will always be different.