In a javabeat mock exam i found the following question
1 Which of the following can prevent a
thread from executing?
(1) A call to its pause method
(2) A call to Thread.yield()
(3) Another thread is given higher priority
(4) A call to its halt() method
the answers are given as 2 and 3.
But according to me Thread.yield() method does not always prevent a thread from executing. It will move from executing state to ready state and the rest is platform dependent.
How can we say that 3 is a correct answer. Is't the priority implementation platform dependent.