Java Professional — Easy
Key points
- The default capacity of an ArrayList is 10 when no size is specified.
- This default capacity can be increased as elements are added to the ArrayList.
- Specifying a larger initial capacity can help optimize performance.
Ready to go further?
Related questions
