A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide 1Z0-808
this week in the
Java in General
Can I Override equals() and hashCode() in my class
Joined: Jan 27, 2011
Aug 26, 2011 02:45:40
I have one doubt ,i.e Can I Override equals() and hashCode() in my class.If i override these two methods what will happen.
Thanks in Advace.
Joined: Sep 08, 2007
Aug 26, 2011 02:49:40
Yes you can override.
For what will happen on overriding you can have search for similar posts in this Forum (
Mohamed Sanaulla |
I agree. Here's the link:
subject: Can I Override equals() and hashCode() in my class
Problem with mock exam question
if we override hashCode method is compulsary to override equals method and viseversa.
equal() & hashcode() override (Kathy Sierra)
Overriding hashCode() and equals()
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015