Java Multi-Threading Question:

Download Job Interview Questions and Answers PDF

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

Java Multi-Threading Interview Question
Java Multi-Threading Interview Question

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?