下列程序的功能是在监控台上每一秒种显示一个字符串“Hello!”,能够填写在线程中下划线位置,使程序完整并能正确运行的语句是

发布于 2021-09-14 06:46:16

publicclassTestimplementsRunnable{
publicstaticvoidmain(Stringargs[]){
Testt=newTest();
Threadtt=newThread(t);
tt.start();
}
publicvoidrun(){
for(;;){
try{____;
}catch(____e){}
System.out.println(“Hello”);
}
}
}
A.sleep(1000)InterrutpedException
B.t.sleep(1000)InterruptedException
C.Thread.sleep(1000)RuntimeException
D.Thread.sleep(1000)InterruptedException

查看更多

关注者
0
被浏览
49
  • 体验AI问答!更聪明、超智能!
  • 一款基于GPT的超级AI助手,可以对话、创作、写文案!
1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

手机
浏览

扫码手机浏览

分享
好友

在线
客服