If I didn’t have to get up early, I( )out tonight, but I start work at 7.30 tomorrow.A. wentB. would goC. had goneD. am going

题目
If I didn’t have to get up early, I( )out tonight, but I start work at 7.30 tomorrow.

A. went

B. would go

C. had gone

D. am going


相似考题
更多“If I didn’t have to get up early, I( )out tonight, but I start work at 7.30 tomorrow. ”相关问题
  • 第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()


    正确答案:D
    解析: 程序中通过继承Thread类来创建线程,而Java中新创建的线程不会自动运行,必须调用线程的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


    正确答案:B
    B。【解析】implements是实现接口,extends是继承类。Thread是‘类,Runnable是接口,所以只有A、B选项语法是正确的。而Runnable是不能返回Static值,所以答案选择B。

  • 第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


    正确答案:D

  • 第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


    正确答案:A
    解析:创建线程有两种方法:实现java.lang.Runnahle接口和继承Thread类并重写run()方法。从创建线程实例的语句Thread tt=new Thread(t);可以看出本程序将Test类的实例t作为参数传递给Thread类的构造方法,因此是通过实现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


    正确答案:A
    A。【解析】Test类实现了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


    A