下列程序的功能是在监控台上每一秒种显示一个字符串“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.Thread.sleep(1000) RuntimeException B.sleep(1000) InterrutpedException C.Thread.sleep(1000) InterruptedException D.t.sleep(1000) InterruptedException
正确答案:BC