What is the Map interface?
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.
|
What is the Collection interface?What is the Collection interface? - A collection represents a group of objects, known as its elements. It is an interface and is a member of the Java Collections Framework...
What is the Locale class?What is the Locale class? - A Locale object represents a specific geographical, political, or cultural region...