ArrayList is backed by array.
Capacity and size are different, capacity means total space while size means occupied space.
If there is insufficient capacity, a new array would be created to hold the values which is useful if you know the capacity to avoid creating new array.
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss