【单选题】
下列程序的功能是在监控台上每隔一秒钟显示一个字符串"Hello!",能够填写在程序中下划线位置,使程序完整并能正确运行的语句是()。public class Test implements Runnable{ public static void main(String args[]){Test t=new Test();Thread tt=new Thread(t);tt.start(); }public void run(){for(;;){ try{________; }catch(______e){} System.out.println("Hello");} }}
A、sleep(1000) InterruptedException
B.sleep(1000) InterruptedException
C.Threasleep(1000) RuntimeException
D.Threasleep(1000) InterruptedException
查看答案解析
参考答案:
正在加载...
答案解析
正在加载...
根据网考网移动考试中心的统计,该试题:
1%的考友选择了A选项
28%的考友选择了B选项
6%的考友选择了C选项
65%的考友选择了D选项