Question d’entretien chez Siemens

what is difference between hash map and hash table?

Réponses aux questions d'entretien

Utilisateur anonyme

1 avr. 2016

1. Hashmap is non synchronized while Hashtable is, which is saying Hashtable is multi-thread safe while Hashmap is not. If your application only has one thread. The you should use Hashmap . 2. Hashmap allows one null key and null values while Hashtable allow no null keys either null values. 3.Hashmap objects interate values by iterator while Hashtable use enumerator. 4. Hashmap is faster than Hashtable 5. Not sure about superclass and legency part

Utilisateur anonyme

18 mars 2010

Hash map can accept null values where as hash table does not accept the null values.