Passionate Development From Journeyman to Master

Java Collection Framework

This is probably going to be the last time I code in Java for a little while.

Reference: Java Collection Framework Tutorials

Important distinctions:

  • Set — a collection that cannot contain duplicate elements. This interface models the mathematical set abstraction and is used to represent sets, such as the cards comprising a poker hand, the courses making up a student's schedule, or the processes running on a machine.
  • List — an ordered collection (sometimes called a sequence). Lists can contain duplicate elements. The user of a List generally has precise control over where in the list each element is inserted and can access elements by their integer index (position). If you've used Vector, you're familiar with the general flavor of List.

Iterator plays a very important role now.