Programs frequently keep data in a list.
Arrays are often used for this.
Arrays are a fundamental feature of Java and most programming languages.
But because lists are so useful,
the standard Java library includes the
which works much like an array but has additional methods and features.
Like an array, an
ArrayList contains elements that are accessed using
an integer index.
However, unlike an array, the size of an
ArrayList is not fixed.
ArrayList will expand as needed as items are added to it.
Several of the features described in this chapter are new to Java 5.0.
Older versions of Java may not work.
ArrayList is one of the standard classes
that students are expected to know for the Advanced Placement test
given in the United States.
(Review: ) Examine the following:
String list = new String;
What is the length of the
array referenced by