Skip to main content

SCJP que

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
p44
Offline
Joined: 2010-12-02

void waitForSignal()
{
Object obj=new object();
synchronised(Thread.currentThread())
{
obj.wait();
obj.notify();
}
}

this code may throw an IllegalStateException.

please explain why?