1.

Which of the following will ensure the thread will be in running state?(a) yield()(b) notify()(c) wait()(d) Thread.killThread()I have been asked this question in homework.I need to ask this question from Multithreading topic in section Multithreading of Java

Answer» RIGHT OPTION is (c) wait()

The explanation is: wait() always causes the current thread to GO into the object’s wait pool. Hence, USING this in a thread will keep it in RUNNING state.


Discussion

No Comment Found

Related InterviewSolutions