File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Hi!!! Question about Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Hi!!! Question about Collection" Watch "Hi!!! Question about Collection" New topic

Hi!!! Question about Collection

Lei Zheng

Joined: May 28, 2003
Posts: 3
I have a question about Collection:
which classes allow unsynchronized read operations by multiple threads in the Collection Hierarchy ?
Can some similar questions appear in the real exam?
[ May 28, 2003: Message edited by: Lei Zheng ]
G Nadeem
Ranch Hand

Joined: Apr 25, 2003
Posts: 48
in my knowledge all classes except Vector and Hashtable, allow non-synchronized access. Vector and Hashtable are thread-safe.
just to mention, we can get synchronized 'version' of new Collection family too. for instance,
Set s = Collection.synchronizedSet(new TreeSet());
Lei Zheng

Joined: May 28, 2003
Posts: 3
G Nadeem
Thank you very much!!!
I agree. Here's the link:
subject: Hi!!! Question about Collection
It's not a secret anymore!