Which statement is true?
Option B is correct - The notify method only wakes the thread. It does not guarantee that the
thread will run.
Option A is incorrect - just because another thread activates the modify method in A this does
not mean that the thread will automatically resume execution
Option C is incorrect - This is incorrect because as said in Answer B notify only wakes the thread
but further to this once it is awake it goes back into the stack and awaits execution therefore it is
not a "direct and sole consequence of the notify call"
Option D is incorrect - The notify method wakes one waiting thread up. If there are more than one
sleeping threads then the choice as to which thread to wake is made by the machine rather than
you therefore you cannot guarantee that the notify'ed thread will be the first waiting thread.
Was this answer helpful ?
Submit Solution