Multiple choice

Which of the following options is true?

i. When an object invokes yield() method, it will not return to ready state. ii. When an object invokes yield() method, it will return to ready state. iii. When an object invokes sleep() method, it will return to ready state. iv. When an object invokes sleep() method, it will not return to ready state.

  1. i. and iii. are true

  2. i. and iv. are true

  3. ii. and iii. are true

  4. ii. and iv. are true

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This answer is correct. When an object invokes yield() method, the object will be ready to perform the next action and so it will be returned to the ready state. When the object calls sleep() method, it will not execute any further action and so it will not be ready to perform next action.