Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HashMap Vs Hashtable !  RSS feed

 
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!