Collections: Sets and Maps

15.3 - 15.4 (in the PDF)

Sets

..



HashSet

TreeSet

Maps

map of names to colors

A map associating String names with Color objects

Using a Map

HashMap

 

Class Question 3

The keys of a map form what kind of collection?

  1. A set
  2. A stack
  3. A list
  4. None of the above