The code mentioned below is a self created one.
The problem is when I run this, I get following exception.
Exception in thread "abc" Exception in thread "abc" java.lang.IllegalMonitorStateException: current thread not owner at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Unknown Source) at com.rajshekharpaul.ThreadA.run(ThreadingTest2.java:12) java.lang.IllegalMonitorStateException: current thread not owner at java.lang.Object.notifyAll(Native Method) at com.rajshekharpaul.ThreadB.run(ThreadingTest2.java:28)
Can anyone help me out in understanding the root of the problem?