二级二级JAVA2007年9月计算机考试二级Java模拟试题一
题目内容

下列程序的功能是在监控台上每隔一秒钟显示一个字符串“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");}}}

2024-07-09

A.sleep(1000)InterruptedException

B.t.sleep(1000)InterruptedException

C.Threa

D.sleep(1000)RuntimeExceptionD.Thread.sleep(1000)InterruptedException

题目答案

试卷相关题目

最新试卷
热门试卷

长理培训客户端 资讯,试题,视频一手掌握

去 App Store 免费下载 iOS 客户端