Possible Duplicate:
What are the differences between ArrayList and Vector?
If I want to store some objects in a data collection and I have to choose between an ArrayList or a Vector, what are the main differences? I think vector are thread-safe and therefore have a performance penalty. Are there any other reasons to prefer on of the data containers?
Vector is a very old class from before the introduction of the Collections framework, therefore its API is polluted with many legacy methods that duplicate the methods from the
CollectionandListinterface.I’d generally avoid using it unless you have to because another API you’re using demands it.