Select the correct answerWhich of these method wakes up the first thread that called wait()?Optionsstart()notify()wake()notifyAll()
Question
Select the correct answerWhich of these method wakes up the first thread that called wait()?Optionsstart()notify()wake()notifyAll()
Solution
The correct answer is notify(). This method wakes up the first thread that called wait() on the same object.
Similar Questions
Select the correct answerWhich of these method is used to tell the calling thread to give up a monitor and go to sleep until some other thread enters the same monitor?OptionsnotifyAll()notify()wait()sleep()
Select the correct answerWhich of the following will ensure the thread will be in running state?Optionsyield()wait()Thread.killThread()notify()
Select the correct answerWhich of this method is used to find out that a thread is still running or not?Optionsrun()isAlive()checkRun()Alive()
Select the correct answerWhich of these method of Thread class is used to Suspend a thread for a period of time?Optionssuspend()terminate()sleep()stop()
Select the correct answerWhich of these method waits for the thread to terminate?Optionsjoin()isAlive()sleep()stop()
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.