Presumably if another thread were simultaneously trying to remove the
element there could be a problem?

Tom

-----Original Message-----
From: Jesper Jorgensen [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 4:52 PM
To: JDJList
Subject: [jdjlist] Vector synchronized get() method?


Hi,
 
Does anyone have the answer to why the  get(int index) method in the
java.util.Vector class is synchronized?
Since it doesn't modify anything two threads can safely access it
concurrently - no?
 
thanks,
Jesper Jorgensen
 
PS.
N!jxʋz᥻!)*'zhi⁥0传̬rܢoj਍+-

This e-mail and any attachment is for authorised use by the intended recipient(s) 
only.  It may contain proprietary material, confidential information and/or be subject 
to legal privilege.  It should not be copied, disclosed to, retained or used by, any 
other party.  If you are not an intended recipient then please promptly delete this 
e-mail and any attachment and all copies and inform the sender.  Thank you.

To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to