aspose file tools*
The moose likes Java in General and the fly likes difference between synchronized list and vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "difference between synchronized list and vector" Watch "difference between synchronized list and vector" New topic
Author

difference between synchronized list and vector

Pavan Rao
Greenhorn

Joined: Apr 11, 2008
Posts: 9
can any one tell me difference between synchronized list and vector
varungupta ggg
Greenhorn

Joined: Jun 03, 2008
Posts: 1
Hi Raja

Difference between Vector and List is

Vector are Thread Safe It means Only one Thread can accec Vector SO it can Hit the Performance.

Whereas List are not Thread Safe so as many thread acess the same at same time.

So High Performance is achived.

So If need to understand our requirement Whther er need thred safe and non thred safe model to store our objects.
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
Syncronized ArrayList and vector both are syncronized. But probably parformance of ArrayList is better than vector.


SCJP 1.5(97%) My Blog
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14266
    
  21

vvv ggg - please check your private messages for an administrative matter from JavaRanch.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3646
    
  15
sdg raja wrote:can any one tell me difference between synchronized list and vector


Vector implements the List interface, so Vector is a synchronized List.

shivendra tripathi wrote:Syncronized ArrayList and vector both are syncronized. But probably parformance of ArrayList is better than vector.


On what do you base that ? Both Vector and ArrayList are backed by arrays, so i would expect performance to be pretty similar. But I would be happy to be corrected on this if you have any figures to support your statement.


Joanne
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
This is helpful...

http://skeletoncoder.blogspot.com/2006/09/java-tutorials-arraylist-or-vector.html


JDBCSupport - An easy to use, light-weight JDBC framework -
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
Jesper Young wrote:vvv ggg - please check your private messages for an administrative matter from JavaRanch.
Same again, please.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference between synchronized list and vector