Why wait notify and notifyAll called from synchronized block or method in Java

Why wait notify and notifyAll called from synchronized block or method in Java

瀏覽:1265
日期:2024-08-05
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 inte...看更多