The Java Collections Framework

  • Quentin CharatanEmail author
  • Aaron Kans
Part of the Texts in Computer Science book series (TCS)



By the end of this chapter you should be able to:
  • use the ArrayList class to store a list of objects;

  • use the HashSet class to store a set of objects;

  • use the HashMap class to store objects in a map;

  • use the enhanced for loop and a forEach loop to scan through a collection;

  • use an Iterator object to scan through a collection;

  • create objects of your own classes, and use them in conjunction with Java’s collection classes;

  • sort elements in a collection using the Comparable <T>  and Comparator <T>  interfaces.

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.University of East LondonLondonUK

Personalised recommendations