• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hi!!! Question about Collection

 
Lei Zheng
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
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
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
G Nadeem
Thank you very much!!!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic