View Single Post
  #2 (permalink)  
Old 09-24-2007, 11:26 PM
amansundar amansundar is offline
D-Web Analyst
 
Join Date: May 2007
Posts: 325
amansundar is on a distinguished road
Default Re: Which is best Vector or ArrayList?

The basic difference between a Vector and an ArrayList is that, vector is synchronized while ArrayList is not. Thus whenever there is a possibility of multiple threads accessing the same instance, one should use Vector. While if not multiple threads are going to access the same instance then use ArrayList. Non synchronized data structure will give better performance than the synchronized one
__________________
cheers
Aman
Reply With Quote