top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

how to override equals and hashcode method in java

+2 votes
110 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
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...