Java Interview Questions and Answers

 

What are three ways in which a thread can enter the waiting state in Java Programming?

A thread can enter the waiting state by invoking its sleep() method, by blocking
on I/O, by unsuccessfully attempting to acquire an objectís lock, or by invoking
an objectís wait() method. It can also enter the waiting state by invoking its (deprecated)
suspend() method.

Posted by:Richards