1---Hashtable is synchronized, whereas HashMap is not. This makes HashMap better for non-threaded applications, as unsynchronized Objects typically perform better than synchronized ones.
2---Hashtable does not allow null keys or values. HashMap allows one null key and any number of null values.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment