Multiple choice

Which of the following statements is/are correct? A. The sleep() method is used to permanently stop the execution of the thread. B. The join() method is used to wait for this thread to die.

  1. Only A

  2. Only B

  3. Both A and B

  4. Neither A nor B

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

A. The sleep() method is used to temporarily stop the execution of the thread. B. The join() method is used to wait for this thread to die.