File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Core Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Core Java" Watch "Core Java" New topic

Core Java

vijay bomma

Joined: Feb 18, 2007
Posts: 2
What is hascCode() ?

how it is used in real-time scenario ?

--- vijay
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
I think that you mean HashCode

HashCodes are usually used to increase the performance of large collections of data. The Hashcode is used for searching into the right subset of the data.

HashCode is used by the following collections, HashSet, HashMap.

Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63837

vijay bomma, please take the time to choose an appropriate forum for your posts. This forum is for questions on HTML and Javascript. This post has been mvoed to a more approriate forum.

[Asking smart questions] [About Bear] [Books by Bear]
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

Take a look at the JavaDoc for Object.hashCode(). It explains, beyond the nice summary that Wilhelm provided, details about the hashCOde() method.
I agree. Here's the link:
subject: Core Java
It's not a secret anymore!