ArrayList:  a standard Java class for keeping track of lists of things

Constructing an ArrayList -- note the type of the list elements given in angle brackets:

Adding elements to the end of a list:

Determining how many items are in a list: theArrayList.size()

Accessing elements in an ArrayList: theArrayList.get(indexOfElement)    theArrayList.set(indexOfElement, value)

Note: Indices range from 0 to N - 1.

Examples:

We often use loops to step through an ArrayList.

If we are not changing which items are in the ArrayList, we can use the special for each style of loop to step through the list.

A subset of handy ArrayList methods: