Pregunta de entrevista de Siemens

what is difference between hash map and hash table?

Respuestas de entrevistas

Anónimo

1 abr 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

Anónimo

18 mar 2010

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