I have a basic question on Java ArrayList.
ArrayList
When ArrayList is declared and initialized using the default constructor, memory space for 10 el
when a ArrayList is declared and initialized using default constructor, memory space for 10 elements will be created. now, when i add 11 th element, what happens is
ArrayList create a new object with the following size
i.e OldCapacity*3/2+1 = 10*3/2+1 =16