1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
public class Synch { public synchronized void s() { // This call to notify() isn't supposed to cause a // java.lang.IllegalMonitorStateException. notify (); } public static void main (String[] args) { (new Synch()).s(); System.out.println ("Ok"); } }