ArrayList

ArrayList is a resizable list, from the java.util package, that holds objects (no primitives: you use Integer, not int). It offers add, get, remove, size, contains. Unlike an array, its size changes dynamically; remove(int) and remove(Object) are two distinct methods.

Example

List<String> noms = new ArrayList<>();
noms.add("Ada");
int n = noms.size();

Related concepts

The whole glossary