Create ArrayList object
ArrayList has the constructors shown here:
ArrayList( )
- builds an empty array list.
ArrayList(Collection<? extends E> c)
- builds an array list that is initialized with the elements of the collection c.
ArrayList(int capacity)
- 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.
Home
Java Book
Collection
Java Book
Collection
ArrayList:
- ArrayList Class
- Create ArrayList object
- Add to ArrayList
- Clear an ArrayList
- Shallow copy of current ArrayList
- If contain a certain object
- Increases the capacity of an ArrayList
- Get/Replace element by index
- Get object for index
- Remove from ArrayList
- Get the size and trim to size
- If ArrayList is empty
- Convert ArrayList to array