Have you tried to run it because i'm getting a java.lang.IllegalMonitorStateException.
That's because the notify statement must be in synchronized code.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
The program is terminated because an exception is thrown.
Try putting the notifyAll in a synchronized block.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.