About “Map” data structures in Collections framework?


A map cannot contain duplicate keys; each key can map to at most one value. The Map interface provides three collection views, which allow a map’s contents to be viewed as a set of keys, collection of values, or set of key-value mappings. The order of a map is defined as the order in which the iterators on the map’s collection views return their elements.The TreeMap class, make specific guarantees as to their order; others, like the HashMap class, do not.