When the HashSet checks to see if ooA2 is there, it will first compute ooA2.hashCode, which for our code will be the default hashCode(), which is just the memory address.
“Note that it is generally necessary to override the hashCode method whenever the equals method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.”