Frage im Vorstellungsgespräch bei Goldman Sachs

hashmap compared to map

Antworten zu Vorstellungsgespräch

Anonym

17. Feb. 2011

HashMap implements Map. if you declare your object as Map you are only allowed to use Map methods, whereas HashMap contains more method you can use, it's a specific implementation of hash (for example TreeMap is also a way to implement Map)

Anonym

3. März 2011

Dont forget to mention that Map is an interface and HashMap is an implementation of the Map Interface.