ArrayList provides methods to manipulate the size and elements of the list dynamically.
Source Code
ArrayList cars = new ArrayList();
cars.add("Volvo");
cars.add("BMW");
cars.set(1, "Ford"); // Replace element at index 1
cars.remove("Volvo"); // Remove "Volvo"
cars.size(); // Get the size of the list