What is the difference between yielding and sleeping?

Java Programming Language >   Multithreading in java >   About Java Tutorial  

Short Question

768


Answer:

When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state.


This Particular section is dedicated to Question & Answer only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.