what is the Yield() method used in threads?
Answer Posted / chikku
This static method is essentially used to notify the system that the current thread is willing to "give up the CPU" for a while. The general idea is that:
The thread scheduler will select a different thread to run instead of the current one.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is fail fast in java?
What is the use of System class?
How objects of a class are created if no constructor is defined in the class?
What happens if we override private method?
What is the syntax and characteristics of a lambda expression? Explain
What is boolean flag in java?
What is java ceil?
How do you sort a string in java?
how we can make a write-only class in java?
Can we have a try block without catch block?
What is arrays fill in java?
What is nested class?
What is a java applet? What is an interface?
How are this() and super() used with constructors in java programming?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread