top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

how to override equals and hashcode method in java

+2 votes
420 views
how to override equals and hashcode method in java
posted Oct 16, 2013 by Nagarajuk

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
i will add http://muhammadkhojaye.blogspot.com/2010/02/java-hashing.html which i find much useful tutorial than any thing else.

1 Answer

+1 vote

If you are using Eclipse it has integrated a very cool hashCode() / equals() generator. You just have to be on a class and do: right click > Source code > Generate hashCode() and equals().

Then, a window will show up and you can choose the fields to include in your methods.

answer Oct 16, 2013 by Deepankar Dubey
...