Good day comrade programmers.
As my expertise in the
Java Programming Language advances, I'm studying and trying to understand new things(for me).
Let's talk about overriding the method
hashCode() I've overriden this method for a class I made, and made it return the int value of one of my instance variables.
Question: Does doing that mean that two objects of the class I made with the same value in the instance variable returned by method: hashCode() will be equal when I use the
== operator?
Or will the == operator always use the bits contained in the reference variable even when hashCode() has been overriden?
PD.
I suppose I could have just asked: Does overriding hashCode() affect how the == operator works? Thank you very much in advance as always,
Your Friend,
Jose