Home / Java Programming / Threads :: Discussion

Discussion :: Threads

  1. Which cannot directly cause a thread to stop executing?

  2. A.
    Calling the SetPriority() method on a Thread object.
    B.
    Calling the wait() method on an object.
    C.
    Calling notify() method on an object.
    D.
    Calling read() method on an InputStream object.

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    Option C is correct. notify() - wakes up a single thread that is waiting on this object's monitor.


Be The First To Comment