网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
Thread类的()方法是不建议使用的。
- A、stop()
- B、suspend()
- C、resume()
- D、全部都是
参考答案
更多 “Thread类的()方法是不建议使用的。A、stop()B、suspend()C、resume()D、全部都是” 相关考题
考题
Thread类中能运行线程的方法是( )。A.resume( )B.start( )C.run( )SXB
Thread类中能运行线程的方法是( )。A.resume( )B.start( )C.run( )D.init( )
考题
在java.lang.object中,存在两个可以完成线程同步,并且实现线程通信的方法,它们是( )。A.start()和stop()B.wait()和notify()C.suspend()和resume()D.setDaemon()和isDaemon()
考题
下列______方法和resume()方法相互搭配,使线程停止执行,然后调用resume()方法恢复线程。 ( )A.interrupt()B.stop()C.suspend()D.yield()
考题
resume方法恢复( )的执行。A.通过调用stop方法而停止的线程B.通过调用sleep方法而停止运行的线程C.通过调用wait方法而停止运行的线程D.通过调用suspend方法而停止运行的线程
考题
下列哪个方法和resume( )方法相互搭配,使线程停止执行,然后调用resume( )方法恢复线程?A.interrupt( )B.stop( )C.suspend( )D.yield( )
考题
下列说法中错误的一项是______。A.通过执行Thread.currentThrea《)返回当前线程的引用B.currentThread()方法是静态方法C.stop()方法强行终止线程的执行,线程结束后,仍然可以再运行D.线程a通过a.suspend()方法暂停执行,通过调用a.resume()恢复执行
考题
判断下列语句哪个正确()。A、在线程休眠时,sleep方法会占用处理器时间B、将方法声明为synchronized,就可以确保不会发生死锁C、不提倡使用Thread类的suspend方法,resume方法和stop方法D、以上描述都正确
考题
Under which circumstances will a thread stop?() A、The method waitforId() in class MediaTracker is called.B、The run() method that the thread is executing ends.C、The call to the start() method of the Thread object returns.D、The suspend() method is called on the Thread object.E、The wait() method is called on the Thread object.
考题
单选题判断下列语句哪个正确()。A
在线程休眠时,sleep方法会占用处理器时间B
将方法声明为synchronized,就可以确保不会发生死锁C
不提倡使用Thread类的suspend方法,resume方法和stop方法D
以上描述都正确
考题
( 难度:中等)线程方法resume()负责重新开始__线程的执行A.被stop方法停止B.被sleep方法停止C.被wait方法停止D.被 suspend方法停止
热门标签
最新试卷