Guest User

Untitled

a guest
May 25th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.14 KB | None | 0 0
  1. synchronized(list) {
  2.     Iterator i = list.iterator(); // Must be in synchronized block
  3.     while (i.hasNext())
  4.         foo(i.next());
  5. }
Add Comment
Please, Sign In to add comment