Java OCA OCP Practice Question 1011

Question

What method call is used to tell a thread that it has the opportunity to run?

  • A. wait()
  • B. notify()
  • C. start()
  • D. run()


B.

Note

The notify() method is used to tell a pool of waiting threads that one of them can run.

There is no guarantee as to which thread will run, though.




PreviousNext

Related