This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Calling the setPriority method on a thread object directly cause a thread to stop executing ? And in which other occasion can directly cause a thread to stop executing ? Besides wait(), yield(), sleep() .
The behavior of the thread scheduler is platform dependent. On some platforms the thread scheduler might make use of the priority level but on others the priority level might be ignored. Since there is no guarantee that the thread scheduler even makes use of the priority level there can be no guarantee that changing the priority level will have an effect. For the purposes of the exam, a statement is true only if the statement is guaranteed by the Java Language Specification or the API Specification (javadocs). Since there is no guarantee that the thread scheduler will react to a change in thread priority, any claim that such an action can cause a thread to stop must be a false statement for the purposes of the exam.
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>