This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HashMap Vs Hashtable !

 
Shivaji Bhosale
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Hashtable for Lock management. I am using connections as a pool.
As I am going the the posts out here, most of the guys employing HashMap.
I know methods of HashTable are synchronized & it doesnt let you have null as a value for a key.
Whats the main reason, so HashMap is preferred inspite of HashTable ?
waiting for your replies...
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this thread. What applies to Vector is equally true for Hashtable.
- Peter
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!