ArrayList and Vector both implements List interface and maintains insertion order.

ArrayList Vector
1. Every method present in ArrayList is non-synchronized. 1. Every method present in ArrayList is synchronized.
2. At a time multiple threads are allowed to operate on ArrayList object and hence ArrayList is not thread safe. 2. At a time only one threads are allowed to operate on Vector object and hence Vector is not thread safe.
3. Threads are not required to wait to operate on ArrayList, Hence relatively performance is high 3. Threads are required to wait to operate on vector object ,Hence relatively performance is low
4. Introduced in 1.2V and it is non-legacy class 4. Introduced in 1.0V and it is a legacy class

Leave a Reply