Alex Kizub wrote:
>>I have also read that the vector is
>>thread-safe.
>
>
> You are right.
>
>>Unlike the new collection implementations, Vector is synchronized.
>
> http://java.sun.com/j2se/1.4.2/docs/...il/Vector.html
>
>
>>So should I synchronize by hand the access to the vector
>>or the vector class handle it for me??
>
>
> no, yes.
Wrong! If there are any sequences of operations that need atomicity,
especially an kind of iteration over the Vector's contents, then
the built-in synchronization is insufficient.