Calling the yield method.
Calling the wait method on an object.
Calling the notify method on an object.
Calling the notifyAll method on an object.
Calling the start method on another Thread object.
第1题:
Which two CANNOT directly cause a thread to stop executing?()
第2题:
Which statements concerning the methods notify() and notifyAll() are true?
第3题:
A.The Thread.sleep() method can take t1 as an argument.
B.The Object.notify() method can take t1 as an argument.
C.The Thread.yield() method can take t1 as an argument.
D.The Thread.setPriority() method can take t1 as an argument.
E.The Object.notify() method arbitrarily chooses which thread to notify.
第4题:
Which two can directly cause a thread to stop executing?()
第5题:
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()?()
第6题:
Which two of statements are true?()
第7题:
Under which circumstances will a thread stop?()
第8题:
void waitForSignal() { Object obj = new Object(); synchronized (Thread.currentThread()) { obj.wait(); obj.notify(); } } Which is true?()
第9题:
Given that t1 is a reference to a live thread, which is true?()
第10题:
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, which statement is the most reliable way to ensue that foo will stop executing wait()?