ArrayList is concrete class which providing the implementation of List interface an object of this class is responsible to represent dynamic resizable array with initial capacity 10 elements.
List list =new ArrayList();
List.add(1);
So here autoboxing came into picture in 1.5 means before jdk 1.5 if we want to store primitive type of data then we have to convert 10 into object of class Integer type like this. And it adds element in insertion order and allowed duplicate Elements. By default capacity is 10.
int x=10;
Integer y =new Integer(x);
Now add into list
List.add(y);
List.add(3,5);
Add 3 postion 5 can provide index
Set method if we apply on it then it replace it the value at the index.
List.set(3,6);
If we again add on index 3 then it remove the data which at that index and add new one.
If you are trying to add more element beyond the capacity of this list then it starts increasing dynamically 50% of that older list what it does it keeps the data of that array size of 10 and 50 % of it and create new one and place all the data from that list into new one and start adding more element. We cannot give incremental factor here.