Lecture 10
7
Collections
•A Collection is an object that stores things
•Collection API must provide ways to
–make an empty container (constructor)
–put things in: put, insert, add, store, ...
–know what’s there:
•get, retrieve, find, lookup, ...
•loop on contents
–throw things out: delete, remove, kill, ...
•Java provides array, List, Map, Set