Interviews2 answers
What is the difference between ArrayList and Vector? which one is better in Java
2 Answers
http://www.tutorialspoint.com/listtutorial/Difference-between-ArrayList-and-Vector-in-java/4680
Munesh SharmaPosted Apr 15, 2014, 12:43 AM EDT
You should normally use ArrayList - it offers better performance.
Vector has just one "advantage" - it is synchronised for concurrent modification. But it turns out that this feature isn't very useful - if you are writing concurrent code, you typically need to lock at a much higher level of granularity than an individual collection class.
As a result, Vector is often considered deprecated nowadays.
Shweta LodhaPosted Feb 3, 2014, 11:03 AM EST

