Java Oop
1 question, most-asked first.
What is the contract between hashCode() and equals()?
Equal objects must return the same hash code. Unequal objects are free to collide — that is legal and normal, not a bug. Break the first rule and hash-based collections lose your data silently.
Asked constantlyintermediate1–8 yrs8 min read