Sahithyan's S2 — Program Construction
Map
A data structure that stores key-value pairs. Keys are unique, and map to a value.
Map in Java
Map
interface defines the basic operations for a map data structure.
SortedMap
interface extends Map
interface and provides additional methods
for sorted maps such as firstKey()
, lastKey()
, headMap()
, tailMap()
, and
subMap()
.
Three primary classes implement these interfaces
HashMap, TreeMap
, and LinkedHashMap
.