网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
18.
A.say
B.talk
C.speak
D.tell
参考答案
更多 “ 18.A.sayB.talkC.speakD.tell ” 相关考题
考题
classBird{staticvoidtalk(){System.out.print(chirp);}}classParrotextendsBird{staticvoidtalk(){System.out.print(hello);}publicstaticvoidmain(String[]args){Bird[]birds={newBird(),newParrot()};for(Birdb:birds)b.talk();}}结果为:()A.chirpchirpB.chirphelloC.hellohelloD.编译失败
考题
现有: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.chirpchirpB.hellohelloC.chirphelloD.编译错误
考题
现有: 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 chirpB、 hello helloC、 chirp helloD、编译错误
考题
单选题class Bird { static void talk() { System.out.print("chirp "); } } class Parrot extends Bird { static void talk() { System.out.print("hello "); } public static void main(String [] args) { Bird [] birds = {new Bird(), new Parrot()}; for( Bird b : birds) b.talk(); } } 结果为:()A
chirp chirpB
chirp helloC
hello helloD
编译失败
考题
单选题现有: 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 chirpB
hello helloC
chirp helloD
编译错误
热门标签
最新试卷