A. went
B. would go
C. had gone
D. am going
第1题:
请阅读下面程序 publicclassThreadTest{ publicstaticvoidmain(Stringargs[])throwsException{ inti=0; Hellot=newHello(); ______, while(true){ System.out.println("GoodMoming"+i++); if(i==2&&t.isAlive()){ System.out.println("MainwaitingforHello!"); t.join();//等待t运行结束 } if(i==5)break;} } } classHelloextendsThread{ inti; publicvoidrun(){ while(true){ System.out.println("Hello"+i++); if(i==5)break;}}} 为使该程序正确执行, 下划线处的语句应是( )。
A.t.sleep()
B.t.yield()
C.t.interrupt()
D.t.start()
第2题:
在程序的下画线处应填入的选项是( )。 public class Test {: public static void main(String args[]){ Test t=new Test; Thread tt=new Thread(t); tt.start; } public void run{ for(int i=0;i<5;i++){ System.out.println("i="+i); } } }
A.implements Runnable
B.extends Thread
C.implements Thread
D.extends Runnable
第3题:
-- Ann is in hospital.
-- Oh, really? I __ know. I __ go and visit her.
A. didn’t; am going to B. don’t; would
C. don’t; will D. didn't; will
第4题:
在下面程序的下画线处应填入的选项是 public class Test______{ public static void main(String args[]) { Test t=new Test(); Thread tt=new Thread(t); tt.start(); } public void run() { for(int i=0;i<5;i++) System.out.println("i="+i); } }
A.implements Runnable
B.extends Thread
C.implements Thread
D.extends Runnable
第5题:
在程序的下画线处应填入的选项是( )。 public class Test { public static void main(String args[]){ Test t=new Test; Thread tt=new Thread(t); tt.start; } public void run{ for(int i=0;i<5;i++){ System.OUt.println("i="+i); } } }
A.implements Runnable
B.extends Thread
C.implements Thread
D.extends Runnable
第6题:
在程序的下划线处填入的选项是________。 public class Test ________ { public static void main(String args[]) { Test t = new Test(); Thread tt = new Thread(t); tt.start(); } public void run() { for(int i=0;i<5;i++) System.out.println("i="+i); } }
A.implements Runnable
B.extends Thread
C.implements Thread
D.extends Runnable