top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Why do I need to override the equals and hashCode methods in Java?

+2 votes
285 views

Why do I need to override the equals and hashCode methods in Java? I mean Why always override hashcode() if overriding equals()?

posted Jul 4, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Although there are lots of materials are available on internet and API document about the necessity of the overriding the hashcode() and equals() method in Java but lots of new developers still not able to understand the necessity of hashcode() method.

Please Refer this link

answer Jul 8, 2015 by Karthick.c
...