Hi,
I have few sure douts that these conecpts are placed over net in many sites are wrong.
http://www.precisejava.com/javaperf/j2se/Collections.htm
1)
this statment is wrong.
The initial size for ArrayList and Vector is 10.
As , ArrayList aList = new ArrayList();
System.out.println(" ArrayList Size " +aList.size()); gives output 0
Means initial size of ArrayList is 0.
While initial size of Vector is also 0 but initial capacity of vector is 10.
but you have to use the capacity methods of vector while there is no capacity method for ArrayList.
Vector aList = new Vector();
System.out.println(" ArrayList Size " +aList.capacity());
2)
ArrayList increases its capacity by half approximately whenever its capacity reaches maximum (10) is wrong
but Vector increases its capacity by double whenever its capacity reaches maximum. thi is correct.
please comments !