PrepZone Logo
PrepZone
Back to Java

Java · Medium

What happens if hashCode() is not overridden properly?

JavaTrickyCollections

Answer preview

If hashCode() is not overridden, it defaults to Object.hashCode() which is typically based on the memory address.…