Difference between ArrayList and Vector? February 7, 2007
Posted by :) in JAVA.trackback
- Internally, both the ArrayList and Vector hold onto their contents using an Array. A Vector defaults to doubling the size of its array, while the ArrayList increases its array size by 50 percent.
- ArrayList doesn’t have a constructor for specifying the incremental capacity, where as Vector has a constructor to specify the initial capacity and incremental capacity.
- Vector is synchronized where as ArrayList is not synchronized


it is very good
thank you for good ansers
it is very useful answer thanks
I didnot understand the first point as u said that doubleing the size and 50 % increase
Hello sir,
I am unable to understand the first point as u said that A Vector defaults to doubling the size of its array, while the ArrayList increases its array size by 50 percent . If possible plese describe it clearly
Nice to see this answer, Thank you. Give more with examples ……
Regards
Madan
Hello Friends,
is there any fixed or default size array list or vector holds. If holds what is the size let me know. Is there any way to synchronize the ArrayList. In real time situatuins when we will use vector and when we will use ArrayList.
Regards
Madan
ArrayList doesn’t have a constructor for specifying the incremental capacity, where as Vector has a constructor to specify the initial capacity and incremental capacity.
this is wrong you can look at http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html
ArrayList constructor takes initial capacity as parameter
sorry I got it now…
wat is the exact key differece between the array list and vector.
how to make arraylist synchronized?