Selasa, 25 Januari 2011

Difference between HashMap and HashTable? Can we make hashmap synchronized?

This question oftenly asked in interview to check whether candidate understand correct usage of collection classes and aware of alternative solutions available.1. The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesn't allow nulls). 2. HashMap does not guarantee that the order

Tidak ada komentar:

Posting Komentar