Showing posts with label Concurrency. Show all posts
Showing posts with label Concurrency. Show all posts
Hidden Iterator in Collections toString()
Posted by
Shimi
Labels:
Collections,
Concurrency
The toString() method in the Java Collection invokes the toString() method of each item using Iterator.
In a multi-threaded environment a call to toString() should be synchronized to prevent ConcurrentModificationException.
Sunday, March 23, 2008 | 0 Comments
Subscribe to:
Posts (Atom)