ListIn the above example, the myList object is synchronized before adding a new element to it. After adding the element, the notifyAll() method is called to notify all waiters that a new element has been added to the list. The package library for java.util.List and notifyAll() method is java.util.myList = new ArrayList (); synchronized(myList) { // Add element to the list myList.add("element"); // Notify all waiters myList.notifyAll(); }