List list = Collections.synchronizedList(new ArrayList()); synchronized (list) { list.add(\"message\"); }
Is the bl
Also Important to note that any methods that use Iterators for example Collections.sort() will also need to be encapsulated inside a synchronized block.