Multiple choice

Which exception is shown by the sleep() method in threads?

  1. IllegalArgumentException

  2. InterruptedException

  3. IllegalMonitorStateException

  4. IllegalStateException

  5. UnsupportedOperationException

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

sleep() method throws this exception.