Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
paul wheaton
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Himai Minh
Bartenders:
Forum:
Beginning Java
equals() & hashCode() method in Object class
shan sundaram
Greenhorn
Posts: 15
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
What is the use of equals() & hashCode() method? where/how to use it?
Thanks in advance,
V.Shanmugam.
Paul Sturrock
Bartender
Posts: 10336
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Have you looked at the JavaDocs for the
Object class
?
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Eitan Levi
Greenhorn
Posts: 14
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
In case you're asking because you're interested in overriding them for your own classes, there's a really good article on JavaWorld:
How to avoid traps and correctly override methods from java.lang.Object
. It shows you how to properly override the equals and hashCode methods.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
hashCode() implementation
HashSet ordering
hashCode and equals
map method containsKey
More...