Java认证考试

现有:  class Bird {  void talk() { System.out.print("chirp "); }         }  class Parrot2 extends Bird {  protected void talk() { System.out.print("hello ");        public static void main(String [] args) {  Bird [] birds = {new Bird(), new Parrot2 () };  

题目

现有:  class Bird {  void talk() { System.out.print("chirp "); }         }  class Parrot2 extends Bird {  protected void talk() { System.out.print("hello ");        public static void main(String [] args) {  Bird [] birds = {new Bird(), new Parrot2 () };         for( Bird b : birds)          b.talk () ;         }         }  结果是什么 ?()      

  • A、 chirp chirp
  • B、 hello hello
  • C、 chirp hello
  • D、编译错误
如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

The best solution to the problem of the spread of bird flu is ______.

A. to kill all the birds in an area where bird flu has been discovered

B. to kill all the chickens

C. to kill all the birds

D. to kill all the chickens when bird flu has been discovered


正确答案:A

    39.答案为A  此题考查文章句意理解、细节定位。略读义章,发现在文章的结尾处有The best way to stop the spread  of bird flu is to kill all the  chickens in an area where bird flu has been discovered。注意其中的in an area where bird flu has been discoveredall the chickens的限定作用,故选A为答案。

第2题:

A bird in the hand is worth two in the ().

A、trees

B、bush

C、forest

D、cage


参考答案:B

第3题:

What does"a bird's-eye view"mean?

A. See a view with a bird' s eyes.

B. A bird looks at a beautiful view.

C. It is a general view from a high position.

D. If is a scenic place.


正确答案:C
a bird’s-eye view是美国俚语,意为“从高处向下看的景致:俯视”。A项意为“用鸟的眼睛看景点”;B项意为“鸟在看美景”;D项意为风景点。故C为正确选项。

第4题:

现有:classBird{voidtalk(){System.out.print("chirp");}}classParrot2extendsBird{protectedvoidtalk(){System.out.print("hello");publicstaticvoidmain(String[]args){Bird[]birds={newBird(),newParrot2()};for(Birdb:birds)b.talk();}}结果是什么?()

A.chirpchirp

B.hellohello

C.chirphello

D.编译错误


参考答案:C

第5题:

The music()like the singing of a bird.

A.hears

B.listens

C.sounds


答案:C

解析:句意:这音乐听起来像鸟鸣。sounds like 的意思是听起来像。

sounds:发出声响

hears:听说,听见(hear的第三人称单数)

listens:听,倾听;听从,听信

第6题:

The passage deals with all the following aspects bird flu EXCEPT _______.

A. the origin and history of bird flu

B. the importance of international cooperation

C. the possible dangers of a national outbreak

D. the significance of preventing it from spreading


正确答案:A

第7题:

( ) fly.

A、The birds

B、The bird

C、Birds

D、Bird


参考答案:C

第8题:

______ he opened the window, a bird flew in.

A、Though

B、The moment

C、If

D、Unless


参考答案:B

第9题:

现有如下包结构:com|--x||--Alpha.class||||--y||--Beta.class||--Gamma.class和类:classTest{Alphaa;Betab;Gammac;}哪三个必须加入到类Test中,以使其通过编译?()

A.packagey;

B.packagecom;

C.importcom.x.*;

D.importcom.x.y.*


参考答案:B, C, D

第10题:

现有如F包结构:com|一一X||一一Alpha.class||||一一yI|一一Beta.class||l--Gamma.class和类:classTest{Alphaa;Betab;Gammac;}哪三个必须加入到类Test中,以使其通过编译?()

A.packagey;

B.packagecom;

C.importcom.x.y.*;

D.importcom.x.*;


参考答案:B, C, D

更多相关问题