Computer Science, asked by Anonymous, 1 year ago

difference between arraylist and vector in java

Answers

Answered by NightHawk
0

ArrayList is non-synchronized which means multiple threads can work on ArrayList at the same time.  


Vector is synchronized. This means if one thread is working on Vector, no other thread can get a hold of it.


Differences

Vectors are synchronized, ArrayLists are not.

Data Growth Methods


Answered by Anonymous
0
Difference between Vector and Arraylist is the most common  Core Java Interview question you will come across in Collection .  This question is mostly used as a start up question by the Interviewers before testing deep  roots of  the Collection  .
Vector , ArrayList classes are implemented using dynamically resizable  array providing fast random access and fast list traversal very much like using an ordinary array . ArrayList  support dynamic arrays that can grow as needed that is ArrayList can be dynamically increased or decreased in size .
Similar questions