what is the different between the Vector class and ArrayList class in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

what is the different between the Vector class and ArrayList class in java?

3rd Jun 2017, 10:05 PM
chris
chris - avatar
1 Answer
+ 2
The difference lies in an attribute called synchronized. But unless you're working with threads this doesn't matter. Vectors as a synchronized class are slightly slower than the ArrayList in the most cases.
3rd Jun 2017, 11:06 PM
merkrafter