Collections
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramesh_Kumar
Posted On:   Friday, March 8, 2002 08:03 AM

In real time applications when should I use a Vector and ArrayList?.

Re: Collections

Posted By:   Jason_Spittel  
Posted On:   Friday, March 8, 2002 09:06 AM

ArrayLists are slightly faster than Vectors, however, are ArrayLists are NOT threadsafe. So if you expect multiple users to be accessing your collection, and you don't want them to overwrite each other, use a Vector. If you are using a new Collection for each user, use an ArrayList for that little bump in speed.
About | Sitemap | Contact