A.peep
B.bark
C.meow
D.Compilationfails.
E.Anexceptionisthrownatruntime.
第1题
11.abstractclassVehicle{publicintspeed(){return0;}}12.classCarextendsVehicle{publicintspeed(){return60;}}13.classRaceCarextendsCar{publicintspeed(){return150;}}......21.RaceCarracer=newRaceCar();22.Carcar=newRaceCar();23.Vehiclevehicle=newRaceCar();24.System.out.println(racer.speed()+,?+car.speed()25.+,+vehicle.speed());Whatistheresult?()
A.0,0,0
B.150,60,0
C.Compilationfails.
D.150,150,150
E.Anexceptionisthrownatruntime.
第2题
A.x.a2();
B.z.a2();
C.z.c1();
D.z.a1();
E.y.c1();
F.x.a1();
第3题
10.interfaceA{voidx();}11.classBimplementsA{publicvoidx(){}publicvoidy(){}}12.classCextendsB{publicvoidx(){}}And:20.java.util.Listlist=newjava.util.ArrayList();21.list.add(newB());22.list.add(newC());23.for(Aa:list){24.a.x();25.a.y();;26.}Whatistheresult?()
A.Thecoderunswithnooutput.
B.Anexceptionisthrownatruntime.
C.Compilationfailsbecauseofanerrorinline20.
D.Compilationfailsbecauseofanerrorinline21.
E.Compilationfailsbecauseofanerrorinline23.
F.Compilationfailsbecauseofanerrorinline25.
第4题
A.Compilationwillsucceedifaextendsb.
B.Compilationwillsucceedifbextendsa.
C.Compilationwillalwaysfailbecauseofanerrorinline7.
D.Compilationwillalwaysfailbecauseofanerrorinline8.
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!