Join
Blogs
Questions
Videos
Tags
Members
Search
 
 
Create your own blog, earn points and get popular!

Is Java Vector synchronized?

Hi all,

I am writing a program in which I have a Java vector object. My program is supposed to be multi threaded and the vector object can be modified by any of the running thread. I am not sure whether the vector is synchronized or I have to write a code in such a way that it gets synchronized. Any thoughts?
No votes yet
Share this
3 answers
Ramnath's picture
Vectors are synchornized ...Any method that touches Vector's contents are Thread Safe.. but you have to pay price of Performance being hit if Vector is used . Use ArrayList if Synchronization is not required
No votes yet
venkatjdv's picture
Yes Vector is Synchronized......vector does not support multi Threading
No votes yet
Ramnath's picture
If the methods are Thread Safe .... it does support MultiThreading ... Could you please tell me what did you mean by "vector does not support multi Threading".... may be my interpretation is wrong
No votes yet