+ 1
What if i filled an array list?
What would happen if i had an array list with a capacity of 10 and i tried to add 11 items to it?
2 Answers
+ 6
That's the advantage of Arraylists over Arrays. They shrink or expand on user requirement. The initial capacity you gave doesn't matter.
+ 2
it will work. array lists automatically expand as needed. you can try it for yourself in a code