Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ArrayList Constructs initial capacity of ten?

User_0Y5EKDec 25 2020
/**
 * Constructs an empty list with an initial capacity of ten.
 */
public ArrayList() {
    this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA;
}

initial capacity Should it actually be 0?
This post has been answered by Patrycja Wegrzynowicz on Dec 27 2020
Jump to Answer
Comments
Post Details
Added on Dec 25 2020
1 comment
658 views