i found this at dos.oracle.com
public static List synchronizedList(List list)
Returns a synchronized (thread-safe) list backed by the specified
list. In order to guarantee serial access, it is critical that all
access to the backing list is accomplished through the returned list.
It is imperative that the user manually synchronize on the returned
list when iterating over it:
List list = Collections.synchronizedList(new ArrayList());
Iterator i = list.iterator(); // Must be in synchronized block
The list being synchronized only means that
remove etc. operations are synchronized and therefore atomic. Iteration however is not and if a thread
adds while another is iterating, you could get a ConcurrentModificationException.
By manually synchronizing your iteration block, you ensure that the list is not modified while iterating.
One alternative is to use a
CopyOnWriteArrayList which provides an iterator that iterates over the list as it was known when the iteration started, regardless of subsequent modifications. That collection is however not very efficient if you need to change the content of the list very often.