As we saw in Lesson AB27, Java Lists and Iterators, a collection is an object that holds other objects. It can be used in many situations, but a collection is most often used to add, remove, and otherwise manage the elements in it.
Collections can be implemented in several ways. That is, the data structure that stores the objects can be implemented using different techniques. In this lesson, Sets and Maps will be studied. A Set is a collection of elements without duplicates. A Map is a group of elements that can be referenced by a key value.
The key topics for this lesson are:
- Sets
TreeSet
HashSet
HashSet vs. TreeSet
- Maps
TreeMap
HashMap
|