阿摩線上測驗 登入

試題詳解

試卷:104年 - SCJP 201-244#99410 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:104年 - SCJP 201-244#99410

年份:104年

科目:OJCP(SCJP)

234. Given: 
foo and bar are public references available to many other threads, foo refers to a Thread and bar is an Object. The thread foo is currently executing bar.wait().
 From another thread, what provides the most reliable way to ensure that foo will stop executing wait()?
(A) foo.notify();
(B) bar.notify();
(C) foo.notifyAll();
(D) Thread.notify();
(E) bar.notifyAll(); F. Object.notify();
正確答案:登入後查看