jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes About Hash Map 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 "About Hash Map " Watch "About Hash Map " New topic
Author

About Hash Map

Raj chiru
Ranch Hand

Joined: Aug 12, 2008
Posts: 141
Hi....
Is it preferable to store large amount of data in Hash map?and what's disadvantage of hash map?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10171
    
    8

"Large amounts" is a relative term. How do you define it?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38045
    
  22
Have a look at this Java™ Tutorials section.
Brian Legg
Ranch Hand

Joined: Nov 07, 2008
Posts: 488
A HashMap is only as good as it's hashing algorithm. For instance a HashMap that throws everything into 1 bucket is equally as useless as a HashMap which throws everything into it's own bucket. The short answer to your question would be "yes", a HashMap or any of the HashXXX objects are designed to divide and conquer large sets of data. If you need other features such as index then a different collection would be needed.

Hope that helps somewhat... if not, please give more details.

SCJA
~Currently preparing for SCJP6
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Hash Map
 
Similar Threads
Sorting Maps
Storing ActionForm&action class-WHERE?
Doubt in Hash Map and Hash Table
Hashmap
Difference Between hashmap and Property class