
610 CHAPTER 9 Multidimensional Arrays and the ArrayList Class
TABLE 9.4 ArrayList Constructors
ArrayList Constructor Summary
Constructor name and argument list
ArrayList<ClassName>( )
constructs an ArrayList object of ClassName type with an initial capacity of 10
ArrayList<ClassName>( int initialCapacity )
constructs an ArrayList object of ClassName type with the specified initial capacity
Because the ArrayList class is in the java.util package, programs using an
ArrayList object will need to provide the following import statement:
import java.util.ArrayList;
9.7.1 Declaring and Instantiating ArrayList Objects
Here is the syntax for declaring an ArrayList ...