What is the difference between yielding and sleeping? - JAVA Interview Questions

What is the difference between yielding and sleeping?


When a task invokes its yield() method, it returns to the ready state, either from waiting, running or after its creation. When a task invokes its sleep() method, it returns to the waiting state from a running state.



Click Here to See Answer .....
Did you like this article ?
Subscribe to my RSS feed and get more JAVA Question, and Guideline, Plus a lot more great advice to help your Software Career.

0 comments:

Related JAVA Questions Posts