Morgan Stanley Interview Question: Talk about hashcode() and equ... | Glassdoor

Interview Question

Java Developer Interview Shanghai, Shanghai (China)

Talk about hashcode() and equals()

Answer

Interview Answer

1 Answer

0

HashCode and equals to function is implemented in HashMap,Even we can override HashCode and equals function
Hashcode returns index calculated with the generated HashMap and equals come into action if same index is returned by hashcode

Anonymous on Jun 2, 2018

Add Answers or Comments

To comment on this, Sign In or Sign Up.