Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between hashmap hashtable etc

 
allyou wantis
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i want know difference between concrete map implementation like hashmap hashtable etc
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
allyou wantis,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're looking for an understanding of the concepts, a good place to start might be a reading of Chapter 12, Section 3 of David J. Eck's Introduction to Programming Using Java.
You also might like to know that you can look at the source code for most all of the classes and interfaces in the J2SE API. As part of your SDK installation, you'll likely find a file named src.jar or src.zip in the J2SE SDK installation folder.
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always do a search on different forums for this kind of question.
For example in the search string you can put 'Hashmap hashtable difference'.
 
sever oon
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hashtable was the old, pre-Collections API data structure. HashMap is the new, post-Collections API way. Always use HashMap in new code.
<rant>
Why did Sun feel it was necessary to retrofit old collections to a new API? It just confuses new developers, not to mention the contracts of the old classes. It makes me wonder why they thought it would be a good idea to make all the members of the new Collections API unsynchronized...and then think it's an even better idea to violate that by retrofitting the old data structures. So, is having all of the collections unsync'd a good idea or NOT?
</rant>
Ahem. Sorry about that. Sometimes I just get SO ANGRY.
sev
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic