What is the difference between Hashmap and Hashtable

Showing Answers 1 - 3 of 3 Answers

saripella

  • Jun 9th, 2005
 

Hashtable is synchronized whereas Hashmap is not

  Was this answer useful?  Yes

ashok

  • Jun 29th, 2005
 

Hashmap can contains null values as the keys and as well as values.But Hashtable dose not allow null values as keys and values. 
hashtable is syncroniged.hashmap is not syncroniged.hashtable can change the iterator.

  Was this answer useful?  Yes

Madhavan Elango

  • Jul 5th, 2005
 

There are three differences: 
 
- access to Hashtable is synchronized whereas access ro hashMap is not. 
- HashMap allows null values as keys and values whreas Hashtable is not 
-Hashtable is one of the original collections of Java but HashMap is added with Java 2, v1.2 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions