void waitForSignal() { Object obj = new Object(); synchronized (Thread.currentThread()) { obj.wait(); obj.notify(); } } Which is true?()
A. This code may throw an InterruptedException.
B. This code may throw an IllegalStateException.
C. This code may throw a TimeoutException after ten minutes.
D. This code will not compile unless “obj.wait()” is replaced with “((Thread) obj).wait()”.
E. Reversing the order of obj.wait() and obj.notify() may cause this method to complete normally.
F. A call to notify() or notifyAll() from another thread may cause this method to complete normally.
查看答案
该试题由用户740****44提供
查看答案人数:20442
如遇到问题请
联系客服
正确答案
该试题由用户740****44提供
查看答案人数:20443
如遇到问题请联系客服