I've just read up some information on Vector
and ArrayList
. From what I can understand Vector
is obsolete compared to ArrayList
. But Vector
is synchronized whilst ArrayList
is not.
But what does that mean? What does it mean when we say that a Vector
is synchronized? And when is this useful?
It means that multiple threads can modify the Vector in parallel without risk of data corruption.
If you want to do this with an ArrayList, you need to use the synchronized
keyword.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With