What is the Map interface?- A Map maps keys to values. - It cannot contain duplicate keys. - It contains only unique elements.
The three general-purpose of Map implementations are
1. HashMap 2. TreeMap 3. LinkedHashMap.
1. HashMap: It is the basic map implementation.
2. TreeMap: It maintains the keys in a sorted order.
3. LinkedHashMap: It maintains the objects which are added to the map.
|