File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
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 |
subject: Can I Override equals() and hashCode() in my class
equal() & hashcode() override (Kathy Sierra)
if we override hashCode method is compulsary to override equals method and viseversa.
Problem with mock exam question
Overriding hashCode() and equals()
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014