

MCQOPTIONS
Saved Bookmarks
1. |
void waitForSignal() {_x005F_x000D_ Object obj = new Object();_x005F_x000D_ synchronized (Thread.currentThread()) {_x005F_x000D_ obj.wait();_x005F_x000D_ obj.notify();_x005F_x000D_ }_x005F_x000D_ }_x005F_x000D_ 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 |
Answer» C. This code can throw a TimeoutException after ten minutes | |