The ArrayList Class in Java
An Introduction |
Prof. David Bernstein |
Computer Science Department |
bernstdh@jmu.edu |
java.util.ArrayList
Classvoid add(int index, E element)
void add(E element)
E get(int index)
E set(int index, E element)
E remove(int index)
int size()
Object
objects in a
collection
Object
to the
appropriate type when you retrieve itArrayList
ArrayList<Boolean>
ArrayList<Double>
ArrayList<Integer>