Diff between ArrayList and Vector

Showing Answers 1 - 9 of 9 Answers

haijing

  • Jun 8th, 2007
 

If you use a Vector in your code and compile it, the compiler will not complain Vector is deprecated. So, I do not think Vector is deprecated. ArrayList is the newer version of Vector, which is not synchronized. ArrayList is recomended for situations where you do not need synchronization.

  Was this answer useful?  Yes

The Vector and ArrayList classes are implemented using dynamically resizable arrays, providing fast random access and fast list traversal—very much like using an ordinary array. Unlike the ArrayList class, the Vector class is thread-safe, meaning that concurrent calls to the vector will not compromise its integrity.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions