wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes which Collection Class is synchronied? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "which Collection Class is synchronied?" Watch "which Collection Class is synchronied?" New topic

which Collection Class is synchronied?

guo mark
Ranch Hand

Joined: Oct 20, 2001
Posts: 43
Ara all Collection Class unsynchronied? or there are some synchronied and some unsynchronied?

meet once ,love every while
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Some are and some aren't. For example, ArrayList isn't synchronized while Vector is. Your best resource would be to check the API for whichever classes you're interested in.

SCJP Tipline, etc.
guo mark
Ranch Hand

Joined: Oct 20, 2001
Posts: 43
Rob Ross

Joined: Jan 07, 2002
Posts: 2205
Well, specifically Vector and HashTable are synchronized. All the other collection classes are unsynchronized. However, you can obtain a synchronized wrapper for the collection classes via the Collections class; but the default implementations are all unsynchronized (except for Vector and HashTable)

SCJP 1.4
I agree. Here's the link: http://aspose.com/file-tools
subject: which Collection Class is synchronied?
Similar Threads
static synchronized method in a StatelessSessionBean
synchronized methods
synchronizedSortedMap(new HashSortedMap()) error
Errors in Mr.Marcus Green's Mock 2