Monday, 25 April 2016

HashMap vs. Hashtable


HashMap vs. Hashtable

Both are similar, except :
  • Hashtable is synchronized, but HashMap is unsynchronized.
  • HashMap permits null. (HashMap allows null values as key and value whereas Hashtable doesn't allow)
  • HashMap does not guarantee the order of the map.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.