void waitForSignal() { Object obj = new Object(); synchronized (Thread.currentThread()) { obj.wait(); obj.notify(); } } Which statement is true?

A) This code can throw an InterruptedException.

B) This code can throw an IllegalMonitorStateException.

C) This code can throw a TimeoutException after ten minutes

D) All the above

View Answer
Option – B.