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


Please Help Members By Posting Answers For Below Questions

Can Exception handling we can handle multiple catch blocks?

646


Explain the difference between runnable and callable interface in java?

588


Is java ee a framework?

520


What is classpath?

550


Can an interface have a class?

566






How do you create immutable object in java?

539


which pattern is default in scanner package?

1803


What is ++ a in java?

570


What is array and arraylist in java?

533


What does the @override annotation do?

563


Is set ordered in java?

572


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

592


What is the purpose of tostring() method in java?

554


what are different ways in which a thread can enter the waiting state? : Java thread

494


What is java argument list?

522