Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
You must have read these lines in context of comparing the new Collections in Java v1.3 and old collection Vector in java. Yes, you are right that the most of the methods in vector are synchronized. This makes Vector slower when multiple threads access the vector elements simultaneously. However, to overcome this inherent slowness in Java from collections, Java designer decided to give you a choice ( fast/slow. this time fast by default ) in case you want to use new collection classes which are there in Java2. New collections' methods are not synchronized, but if you want to work with synchrozined collections then you can have it just writing a few extra lines of code. Thanx Replies: |
Sponsored Links
|