国家开放大学

I’d love to have a break, but I can't () the time now.A.spareB.spendC.speak

题目
I’d love to have a break, but I can't () the time now.

A.spare

B.spend

C.speak

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

请阅读下面程序 public class ThreadTest { public static void main(String args[]) throws Exception{ int i=0; Hello t=new Hello(); while(true) { System.out.println("Good Moming"+i++); if (i==2 && t.isAlive()) { System. out.println("Main waiting for Hello!"); t.join(); //等待t运行结束 } if(i==5) break;} } } class Hello extends Thread { int i; public void run() { 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()方法,才能运行该线程。因此,下划线处的语句应调用线程的start()方法,即t.start()。
  Thread类还提供了—些方法对线程进行基本控制,其中,join()方法使当前线程暂停执行,等待调用该方法的线程结束后,再恢复执行:isAlive()方法用来测试线程是否活着。
  因此,本题的正确答案是选项D。

第2题:

—I'd met Smith several times before.—So (have) ( ) I.


正确答案:had

第3题:

3. —Come and join us,Jimmy !

—I-m sorry,but I-m really busy now.lf I _______ time,l would certainly go.

A. will have

B. have had

C. had

D. have


正确答案:C
3.C【解析】由“我现在很忙”及主句谓语是“would+ 动词原形”推知,if从句应用虚拟语气,表示与现在的事实相反,从句谓语动词应用过去时。故答案为C。

第4题:

以下是死循环的程序段是 。

A.for(i=1; ; ) if(i%2==0) continue; if(i%3==0) break; }

B.i=32767; do{if(i<0) break;}while(i);

C.for(i=1; ; ) if(i<10) continue;

D.i=1; while(i--);


D

第5题:

—— ______they ______an English class?

——N0.they aren’t.

A.Are;having

B.Are;have

C.D0;have

D.Can;have


正确答案:A
通过答语N0,they aren’t来判断,问句应用现在进行时,答案为A。

第6题:

--Your phone number again? I _______ quite catch it.

A.don't

B.can't

C.couldn't

D.didn't


参考答案:D

第7题:

请阅读下面程序 public class ThreadTest{ public static void main(String args[])throws Ex- ception{ int i=0; Hello t=new Hello; ; while(true){ System.Out.println("Good Morning"+i++): if(i= =2t.isAlive){ System.out.println("Main waiting for Hel- lo!"); join;//等待t运行结束 } if(i= =5)break;} } } class Hello extends Thread{ int l; public void run{ while(true)( System.Out.println("Hell0"+i++); if(i= =5)break;)))

A.t.sleep

B.t.yield

C.t.interrupt

D.t.start


正确答案:D
D。【解析】程序中通过继承Thread类来创建线程,而Java中新创建的线程不会自动运行,必须调用线程的start方法,才能运行该线程。

第8题:

( 28 )请阅读下面程序

public class ThreadTest {

public static void main ( String args[ ]) throws Exception {

int i=0;

Hello t = new Hello ();

___________;

whlle ( true ){

System.out.println ( "Good Morning"+i++ ) ;

if ( i=2 && t.isAlive ()){

System.out.println ( "Main waiting for Hello ! ” );

tjoin () ; // 等待 t 运行结束

if ( i==5 ) break :}

}

class Hello extends Thread {

int i ;

public void run ()笼

while ( true ){

System.out.println ( "Hello"+i++ ) ;

if ( i=5 ) break ;}}}

为使该程序正确执行,下划线处的语句应是

A ) t.sleep ()

B ) t.yieldn ()

C ) t.interrupt ()

D ) t.start ()


正确答案:D

第9题:

请阅读下面程序 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()方法,才能运行该线程。

第10题:

执行下列程序段后,i的正确结果是() int i=9; switch(i) { case 9:i+=1; case 10:i++;break; case 11: ++i;break; default:i+=i;break; }

A.9

B.10

C.11

D.24


形成死循环