Witscale Test Center

12.2 Conditions that prevent the running of a thread for some time > 12.2.2 Methods in java.lang.Object that influence the thread scheduling


12.2.2 Methods in java.lang.Object that influence the thread scheduling

The support of Java threading also lies partially in java.lang.Object. This class has following three thread –related methods. Therefore, every thread object also has them (as it inherits them from java.lang.Object)

 

public final void wait()

public final void notify()

public final void notifyAll()

 

These three methods are extremely useful for threads to coordinate their actions when they are accessing common set of data or code. We will see the details of these method in synchronization section.