当前位置:SCJP程序员认证考试题库

问题:

[单选]

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.

水利工程监理单位平行检测的费用由()承担。 项目法人。 监理单位。 施工单位。 检测单位。 “比较教育是外国教育史向现在的延伸。”持这种观点的教育家是() 从研究时间上看,学前比较教育学的研究中心是() “比较教育是一种历史的教育,是教育史研究从过去到现在的继续。”这是()观点 “中体西用论”

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

参考答案:

  参考解析

本题暂无解析

在线 客服