Difference between an array list’s size and its capacity

What is the difference between an array list’s size and its capacity? What is the relationship between the two values? (Is one always larger or smaller than the other, for instance?)

Leave a Reply

Your email address will not be published. Required fields are marked *