This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Core Java" Watch "Core Java" New topic
Author

Core Java

vijay bomma
Greenhorn

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
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

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] [Bear's FrontMan] [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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Core Java