• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between synchronized list and vector

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can any one tell me difference between synchronized list and vector
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Syncronized ArrayList and vector both are syncronized. But probably parformance of ArrayList is better than vector.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
vvv ggg - please check your private messages for an administrative matter from JavaRanch.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is helpful...

http://skeletoncoder.blogspot.com/2006/09/java-tutorials-arraylist-or-vector.html
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper Young wrote:vvv ggg - please check your private messages for an administrative matter from JavaRanch.

Same again, please.
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic