0% found this document useful (0 votes)
3 views

Map+in+Java

The Map interface in the Collection Framework is distinct from the Collection interface, storing data in key-value pairs without allowing duplicate keys. Implementations of the Map interface include HashMap, LinkedHashMap, and TreeMap. Maps are ideal for scenarios requiring key-value associations, such as error codes with descriptions or zip codes with cities.

Uploaded by

abhimanyu thakur
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Map+in+Java

The Map interface in the Collection Framework is distinct from the Collection interface, storing data in key-value pairs without allowing duplicate keys. Implementations of the Map interface include HashMap, LinkedHashMap, and TreeMap. Maps are ideal for scenarios requiring key-value associations, such as error codes with descriptions or zip codes with cities.

Uploaded by

abhimanyu thakur
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Collection

: Map
Interface
Collection Framework: Map
• Map interface is not a subtype of the
Collection interface. Therefore it behaves a bit
different from the rest of the collection types.
• Map store the data in Key-value pair.
• Map doesn’t store the duplicate key but value
would be.
Collection Framework: Map
• HashMap, LinkedHashMap & TreeMap are the
classes which implement Map Interface.
When use Map
• Maps are perfectly for key-value association
mapping:
Error codes and their descriptions
Zip codes and cities
Classes and students ...etc

You might also like