






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Suppose you wanted to associate two things together For example:
There exists a Map type to do this for you! (page 920 in book) To be general generics are used for both the key and value (key = email, value = name) (See: GoodMap.java) key (from) value (to) You should always check what code is available!
A list can have duplicates (since it is has stores elements by order), sets cannot Maps actually use both of these:
Collection
An iterator is simply something that goes over a whole list/array/set This is actually why we always use “i” “Iterator” is actually an interface, so “i” is not an Iterator
Many pre-made Classes can return an Iterator