Lecture 9: Sets, Maps & Other Collections

This lecture briefly reviews arrays and lists, then looks at how Java supports more specialised sequence types: stacks and queues. It then moves on to consider how associative collections differ fundamentally from sequences such as lists. It considers how maps associate keys with values, and looks at how the different implementations of the Map interface work. There is some brief consideration of sets, then the lecture concludes with an examination of the role played by the equals(), hashCode() and compareTo() methods in supporting the storage of objects in collections.

Useful resources: