@Alaa That doesn't affect Vector's thread safety. Vector is internally synchronized, so single operations are Thread-safe. However, the issue is there are no transactional operations like I described...
Type: Posts; User: helloworld922
@Alaa That doesn't affect Vector's thread safety. Vector is internally synchronized, so single operations are Thread-safe. However, the issue is there are no transactional operations like I described...
@datathinker read my reply on why not use Vector. It covers why internal synchronization in Vector is a very bad thing. Just because you're using a Vector doesn't mean your program is "thread safe"....
It has to deal with how modern computer architectures work, and what optimizations a compiler is allowed to make.
Thread safety only matters if a certain resource can be concurrently accessed from...
As sci4me, Vector is internally "thread-safe" while ArrayList isn't. Personally I wouldn't ever use Vector because there is both too much and too little thread safety with Vector. You'll end up with...