According to a book I was reading
There is an important distinction between the capacity of an array list and the size of an array. If you allocate an array with 100 entries, then the array has 100 slots, ready for use. An array list with a capacity of 100 elements has the potential of holding 100 elements (and, in fact, more than 100, at the cost of additional reallocations)— but at the beginning, even after its initial construction, an array list holds no elements at all.
However, we can also create an ArrayList without any capacity defined.
How will an ArrayList without any capacity defined and an ArrayList with capacity allocate its elements and when we should use one over the other?
The only thing striking my mind is, why would we have capacity if in both ways (ArrayList with capacity and ArrayList with no capacity), the values will be treated same way, so the only possible reason coming in my mind is that they both hold values differently.