Explain some ways in which a thread can enter the waiting state?
Submitted by: AdministratorA 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.
Submitted by: Administrator
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.
Submitted by: Administrator
Read Online Java Multi-Threading Job Interview Questions And Answers
Top Java Multi-Threading Questions
☺ | Explain deadlock? |
☺ | What is the sleep() method Data type for the parameter? |
☺ | Explain the difference between preemptive scheduling and time slicing? |
☺ | How many threads at a time can access a monitor? |
☺ | Name the default thread at the time of starting the program? |
Top Java Programming Language Categories
☺ | Core Java Interview Questions. |
☺ | Hibernate Interview Questions. |
☺ | Advanced Java Interview Questions. |
☺ | IBM WebSphere Interview Questions. |
☺ | Spring Framework Interview Questions. |