Vector and ArrayList...
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   raja_raja
Posted On:   Monday, October 3, 2005 08:00 AM


Hi,



We all know, what is the difference between Vector and ArrayList. The only difference is Vector is Synchronized and there would be performance issue due to this.



So, i want to know, what will be the performance issue if Vector is used.



Also, when Vector or ArrayList can be used in our project. Can anyone give example for each in real time scenerio.



Thanks in Advance

Vishnurajan t k

Re: Vector and ArrayList...

Posted By:   rahul123  
Posted On:   Wednesday, December 18, 2013 11:02 PM

When your programs is using mulitthreading that  time to use Vector. It effect's performence. If the program not implementing threads then you stick to ArrayList.
Because all method present in vector are synchronized so only one thread at a time can use this method
so performance will be low

Re: Vector and ArrayList...

Posted By:   ANANTH_KRISHNA  
Posted On:   Wednesday, December 28, 2005 08:56 PM

When your programs is using mulitthreads it the time to use Vector. It effect's performence. If the program not implementing threads then you stick to ArrayList.

Re: Vector and ArrayList...

Posted By:   Anonymous  
Posted On:   Thursday, December 15, 2005 01:34 AM

I want when we go for vector and when we go for arraylist

Re: Vector and ArrayList...

Posted By:   WarnerJan_Veldhuis  
Posted On:   Monday, October 3, 2005 10:20 AM

Synchronized code always is a performance hit. As long as you don't use lists that are accessed by multiple threads, use ArrayList. If you use lists that ARE simultaneously accessed by concurrent threads, which you'd probably know, use a Vector, or use Collections.synchronizedList( List ) (Dox here)
About | Sitemap | Contact