Re: Why use of vector is restricted in Java2
Monday, March 25, 2002 01:38 PM
I'm only going to cover what I know, but...
arraylist is "preferred" I believe simply because it's more efficient (its methods are not by default, synchronized like vectors are), and therefore give a slight performance improvement.
If you run into the case where you may find that you need to synchronize methods, your easiest way to go is with vector; however, you could simply synchronize through an extended version of arraylist whatever methods you prefer.
Hope this helps, and if anybody has anything to add please do.