Friday, May 20, 2011 Most of Java developer knows that wait() ,notify() and notifyAll() method of object class must have to be called inside synchronized method or synchronized block in Java but how many times we thought why ? Recently this questions was asked to in Java interview to one of my friend, he pondered for a moment and replied that if we don't call wait () or notify () method from synchronized context we will receive IllegalMonitorStateException in java.
Read full article from Why wait notify and notifyAll called from synchronized block or method in Java
No comments:
Post a Comment