第1题:
调用以下哪些方法可以使运行状态的线程进入阻塞状态?( )
A.start( ),yield( ),sleep( ),join( )和wait( )
B.start( ),yield( ),sleep( ),join( ),wait( )和stop( )
C.yield( ),sleep( ),join( )和wait( )
D.yield( ),sleep( ),join( ),wait( )和stop( )
第2题:
A、start()
B、sleep()
C、yield()
D、wait()
第3题:
A.sleep()方法是使线程停止一段时间的方法
B.在sleep时间间隔期满后,线程立即恢复执行
C.wait()方法用于线程交互
D.使用wait()方法后,线程需要被通知唤醒
第4题:
调用线程的下列方法,不会改变该线程在生命周期中状态的方法是( )。
A.yeild()
B.wait()
C.sleep()
D.isAlive()
第5题:
A.Itispossibletosynchronizestaticmethods.
B.Whenathreadhasyieldedasaresultofyield(),itreleasesitslocks.
C.Whenathreadissleepingasaresultofsleep(),itreleasesitslocks.
D.TheObject.wait()methodcanbeinvokedonlyfromasynchronizedcontext.
E.TheThread.sleep()methodcanbeinvokedonlyfromasynchronizedcontext.
F.Whenthethreadschedulerreceivesanotify()request,andnotifiesathread,thatthreadimmediatelyreleasesitslock.
第6题:
如果线程调用下列方法,不能保证使该线程停止运行的是
A ) sleep ()
B ) stop ()
C ) yield ()
D ) wait ()
第7题:
A.Thread.wait();
B.Thread.join();
C.Thread.yield();
D.Thread.sleep(1);
E.Thread.notify();
第8题:
A.sleep()方法是使线程停止一段时间的方法;
B.在sleep时间间隔期满后,线程立即恢复执行;
C.wait()方法用于线程交互
D.使用waitI()方法后,线程需要被通知唤醒;
第9题:
如果线程调用下列方法,不能保证使该线程停止运行的是( )。
A.sleep( )
B.stop( )
C.yield( )
D.wait( )
第10题:
如果线程调用下列方法,不能保证使该线程停止运行的是
A.sleep()
B.stop()
C.yield()
D.wait()