To find out how many elements an ArrayList have, use the size method:

Example

cars.size();



Practice Excercise Practice now