Wednesday, August 19, 2009

Hashmap vs Hashtable in java

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.

No comments: