In mathematics, a map is just a collection of pairs. In the Collection Framework, however, the interfaces
Map and Collection are distinct. The reasons for this distinction have to do with the ways that Setand
Map are used in the Java libraries. The typical application of a Map is to provide access to values stored
by keys. The sets of collection operations are all there, but one works with a key-value pair instead of an
isolated element. Map is therefore designed to support the basic operations of get()and put() , which
are not required by Set.
The following points need to be remembered regarding ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.