Hi Steve,
You overload the equals method to make your own definition of
when two objects are equal. Instead of the standard def. of
the equals method your equals method states that two objects
are equal if their a and b values are alike.
Example:
Now, according to the persons impl. of equals two persons are equals
if they have the same name and the same age.
Now, let's return to yuor question:
So what does the line
code:
if(o.a == a && o.b == b) return true;
mean then, i.e., what is o.a (and o.b)
We can translate it to:
If ( (the "other" objects a value == this objects a value) &&
(the "other" objects b value == this objects b value))
then we return true.
For instance, in
/Svend Rost