posted 17 years ago
Be careful. Synchronising an individual List or Map is rarely sufficient to make a piece of code thread-safe. It makes the actual List or Map immune to corruption due to multi-threaded access, but there are almost always other concurrency issues to address; these very often mean that coarser-grained synchronisation is needed.
For those rare occasions when synchronising an individual List or Map really is what you need, then Collections.synchronizedList/Map() methods are indeed useful.
[ November 05, 2007: Message edited by: Peter Chase ]
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.