File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HashMap Vs Hash table

 
Ginu Jacob
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone tell me the difference between hash map and hash table?

I know that hash table does not allow any null values whereas Hash map does.
Any other differences?

regards,
Ginu Jacob
 
Nibin Jacob Panicker
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main diffrence btw HashTable and HashMap is that HashTable methods are Threads-Safe(meaning they are synchronised methods) while HashMap is not ThreadSafe..So basically HashTable is used when more than one thread will be accessing it..
 
Kudret Serin
Ranch Hand
Posts: 167
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
HashMap can store one null key and multiple null values but HashTable can not have any null.
HashTable is synchronized but HashMap is NOT.
Cheers
 
Ginu Jacob
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If u have any sample code for the same,please post it..

regards,
ginu
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic