ArrayList vs Vector || Java interview question 2021

Опубликовано: 21 Февраль 2026
на канале: Engineers choice tutor
371
8

ArrayList:
Every method present in the Arraylist is non-synchronized.
At a time multiple threads are allowed to operate on arraylist object and hence it is not thread safe.
Relatively performance is high because threads are not required to wait to operate on Arraylist object.
Introduced in 1.2 V hence it is called non-legacy class.

Vector:
Every method present in the Vector is synchronized.
At a time only one thread is allowed to operate on vector object, and hence it is thread safe.
Relatively performance is low because threads are required to wait to operate on Vector object.
Introduced in 1.0 V and it is called legacy class.

#collectioninjava
#collectioninterviewquestion
#java
#javainterviewquestion If you want to help us for enlarging our channel, then please donate us by your own wish:
Paytm: 7509058785
Upi: 7509058785@ybl