What is the difference between arraylist and vector Java Interview

preview_player
Показать описание


Free Download Java Interview Book. All The Best.

What is the difference between Vector and ArrayList ?

Java Vector class is internally synchronized and ArrayList is not.


In Java ,by default, Vector doubles the size of its array when its size is increased. But, ArrayList increases by half of its size when its size is increased.


When you use Vector or ArrayList, always initialize to the largest capacity that the java application will need. Since incrementing the size is a costlier operation.
Рекомендации по теме
Комментарии
Автор

WELL DONE BOSS !!! can you do a favour ?
All interviews ask about Source control CVS, Subversion . Can you kindly do an Eclipse demo for it ? Will be very HELPFUL

japanuser
Автор

Qadam Qadam baṛāē jā
khushi kē geet gāē jā
yē zīndagi hai qâum kī
tū qâum pē lūtāē jā!

WolfySnackrib