As per the Java API the default capacity for a java.util.ArrayList is 10.
public ArrayList()
Constructs an empty list with an initial capacity of ten.
I created a list without specifying the initial capacity as below and found that the initial capacity is 0 for the list.
ArrayList<String> list = new ArrayList<String>();
ArrayList<String> list50 = new ArrayList<String>(50);
list.add("1");
list50.add("2");
System.out.println(list.size());
I know i am making some silly mistake in interpretation, please correct me.