In previous sections, you stored multiple values in arrays and ArrayLists. Both rely on numeric indices to find elements. That works when you know the position, but it fails when you need to look something up by a name, a word, or any non-numeric identifier.
In this section, I'll show you Java's HashMap and HashSet. These structures let you store and retrieve data by custom keys instead of positions. You'll learn how to insert, retrieve, remove, and iterate over entries. You'll also see TreeMap, TreeSet, and LinkedHashMap, which give you sorted or ordered alternatives.