Arraylist vs Vector

How is arraylist different from a Vector, are their any boundations.

Main difference between Vector and ArrayList

Vector is slower than ArrayList because it is synchronised, By synchronised, it means that one thread can access the code at a time. No two threads can work on the same resource at the same time.

ArrayList increases its size by half the old size and vector doubles its size every-time it is about to get filled.

for eg :- In case of ArrayList if size was 10 by default, then after growing list size would be 15
In case of Vector the size will simply double up.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.