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!

Is there any default size for ArrayList

807591Mar 7 2008 — edited Mar 7 2008
The default capacity of Vector is 10.

Is there any default size for ArrayList ??

Vector v = new Vector();
System.out.println("==> "+v.capacity()); // output is ==> 10

java.util.List alist = new ArrayList();
System.out.println("==> "+v.capacity()); // here the out put is ==> 0

Regards
Dhinesh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 4 2008
Added on Mar 7 2008
5 comments
637 views