" What is an ArrayList ? "
An ArrayList is a resizable-array implementation of the Java List interface.
Arraylists will always store objects like String and Integer. This might seem similar to making an array of objects, but with an ArrayList, items can be easily added and removed from the ArrayList. |
List of the constructors provided by the ArrayList class:
ArrayList( ) This constructor builds an empty array list ArrayList(Collection c) This constructor builds an array list that is initialized with the elements of the collection c ArrayList(int capacity) This constructor builds an array list that has the specified initial capacity. The capacity is the size of the underlying array that is used to store the elements. The capacity grows automatically as elements are added to an array list. |