Multiple choice java

Which of the following will not directly cause a thread to stop?

  1. notify()

  2. wait()

  3. InputStream access

  4. sleep()

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The notify() method is used to wake up a thread that is waiting on an object's monitor, but it does not cause the current thread to stop or terminate. In contrast, wait() blocks the thread, sleep() pauses it, and blocking I/O operations like InputStream access can also stop thread progress until data is available.