Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Jasmine Grant   on Jul 15 In Java Category.

  
Question Answered By: Sam Anderson   on Jul 15

I've often wondered this myself. First of all, HashMap is an implementation of
AbstractMap while Hashtable is an implementation of Dictionary. The major
differences are really that you cannot use null values in Hashtable and also
that HashMap is unsynchronized. Being unsynchronized means that a HashMap is
not thread-safe. So, in a Hashtable you can call the methods keys() or
elements() and get an Enumeration() which is a thread-safe way to process all
the keys or elements respectively. HashMap does not give you this ability.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Hashmap Or get search suggestion and latest updates.


Tagged: