Java Multi-Threading Question:
Download Questions PDF

Explain some ways in which a thread can enter the waiting state?

Answer:

A thread can enter the waiting state by the following ways:

We can invoke sleep() method of the thread.
An attempt to acquire the object’s lock can put the thread in waiting mode.
We can also invoke wait() method of the thread.
A thread can also be entered in waiting state by invoking its suspend() method.

Download Java Multi-Threading Interview Questions And Answers PDF

Previous QuestionNext Question
Explain Thread?What the difference is between notify and notify All methods?