Java认证考试

现有:  5.  class Order2 implements Runnable  {     6.    public void run()  {     7. for (int x- o;  x<4;  x++)  {  8. try{Thread.sleep(100);  )catch  (Exception e)  {  }     9.    System.out.print("r");     10.    }  }  11.    public static void main(stri

题目

现有:  5.  class Order2 implements Runnable  {     6.    public void run()  {     7. for (int x- o;  x<4;  x++)  {  8. try{Thread.sleep(100);  )catch  (Exception e)  {  }     9.    System.out.print("r");     10.    }  }  11.    public static void main(string  []  args)  {     12.    Thread t=new Thread(new order2());     13.    t.start();  14.    for(int x=0;  x<4;  x++)  {     15.    //insert code here     16.    System.out.print("m");     17.  }  }  }  哪一个插入到第15行,最有可能产生输出 rmrmrmrm?()     

  • A、  Thread.sleep(1);
  • B、  Thread.sleep(100);
  • C、  Thread.sleep(1000);
  • D、  try{  Thread.sleep(1);  )  catch  (Exception e)  {  }
  • E、  try{Thread.sleep(100);  )  catch  (Exception  e)  {  }
  • F、  try{Thread.sleep(1000);  )  catch  (Exception  e)  { }
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

( )5. —How do the students send their homework to their teachers?

—___________.

A.By fax

B.By faxes

C.By the fax

D.By a fax


正确答案:A

第2题:

对于技术改造项目还应分析企业现有的哪些因素()

A、现有场地的可利用性

B、现有公用设施的可利用性

C、现有技术的可利用性

D、现有设备的可回收性

E、现有辅助设施的可利用性


参考答案:ABE

第3题:

5.¥108000.50,写成中文大写为拾万捌仟零伍角。( )


正确答案:×

应写成人民币壹拾万捌仟元零伍角

第4题:

现有:

1.classSuperFoo{

2.SuperFoodoStuff(intx){

3.returnnewSuperFoo();

4.}

5.}

6.

7.classFooextendsSuperFoo{

8.//insertcodehere

9.}

和四个声明:

FoodoStuff(intx){returnnewFoo();}

FoodoStuff(intx){returnnewSuperFoo();}

SuperFoodoStuff(intx){returnnewFoo();}

SuperFoodoStuff(inty){returnnewSuperFoo();}

分别插入到第8行,有几个可以通过编泽?()


参考答案:D

第5题:

现有:1.classHorseRadish{2.//insertcodehere3.protectedHorseRadish(intx){4.System.out.println("bokchoy");5.}6.}7.classWasabiextendsHorseRadish{8.publicstaticvoidmain(String[]args){9.Wasabiw=newWasabi();10.}11.}分别插入到第2行,哪两项允许代码编译并产生"bokchoy"输出结果?()

A.//justacomment

B.protectedHorseRadish(){}

C.protectedHorseRadish(){this(42);}

D.protectedHorseRadish(){newHorseRadish(42);}


参考答案:C, D

第6题:

5. Thanks _________your help.

A.of

B.in

C.at

D.for


正确答案:D
5.D【解析】这是个固定句式,Thanks for...意为 “感谢……”。

第7题:

Don’t forget that you ____ me $5.( )

A、 cost

B、 spend

C、 owe

D、 take


正确答案:C

第8题:

5. Please cut _________ the meat and let's make dumplings.

A.up

B.down

C.into

D.off


正确答案:A

第9题:

现有1.classCalc{2.publicstaticvoidmain(String[]args){3.try{4.intx=Integer.parselnt("42a");5.//insertcodehere6.System.out.print("oops");7.}8.}9.}下面哪两行分别插入到第五行,会导致输"oops"?()

A.}catch(IllegalArgumentExceptione){

B.}catch(IllegalStateExceptionc){

C.}catch(NumbelFormatExceptionn){

D.}catch(ClassCastExceptionc){


参考答案:A, C

第10题:

5. Passengers are not allowed .

A. smoking

B. to smoke

C. smoked

D. smokes


正确答案:B
5.B【解析】sb.be allowed to do sth.表某人被允许做某事。allow sb.to do sth.意为允许某人做某事,al- low doing sth.表允许做某事。

更多相关问题