第1题
:A.sleep(1000)InterruptedException
B.t.sleep(1000)InterruptedException
C.Thread.sleep(1000)RuntimeException
D.Thread.sleep(1000)InterruptedException
第2题
A.sleep(1000)
B.t.sleep(1000)InteruptedException InterruptedException
C.Thread.sleep(1000)
D.Thread.sleep(1000)RuntimeException InterruptedException
第3题
A.sleep(1000)
B.t. sleep(1000) InterruptedExceptionInterruptedException
C.Thread. sleep(1000)
D.Thread. sleep(1000) RuntimeExceptionlnterruptedException
第4题
A.sleep(1000)
B.t.sleep(1000)InterruptedExceptionInterruptedException
C.Thread.sleep(1000)
D.Thread.sleep(1000)RuntimeExceptionInterruptedException
第5题
A.sleep(1000)
B.t.sleep(1000)InterruptedExceptionInterruptedException
C.Thread.sleep(1000)
D.Thread.sleep(1000)RuntimeExceptionInterruptedException
第6题
A.sleep(1000); InterruptedException
B.t. sleep(1000); InterruptedException
C.Thread. sleep(1000); RuntimeException
D.Thread. sleep(1000); InterruptedException
第7题
A.sleep(1) RuntimeException
B.t.sleep(1000) InterruptedException
C.Thread.sleep(1) InterruptedException
D.Thread.sleep(1000) InterruptedException
第8题
A.sleep(1) RuntimeException
B.t.sleep(1000) InterruptedException
C.Thread.sleep(1) InterruptedException
D.Thread.sleep(1000) InterruptedException
第9题
A.输出字符串:Hello
B.输出字符串:World!
C.输出字符串:Hello,World!
D.输入字符串
第10题
下列程序的功能是创建一个显示5个“Hello!”的线程并启动运行,试将程序补充完整。
public class ThreadTest extends Thread{
public static void main(String args[ ]){
ThreadTest t=new______;
t.start();}
public void run(){int i=0;
while(true){System.out.println("Hello!");
if(i++==4)break;
}
}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!