A.0
B.1
C.2
D.3
E.4
第1题:
A.0
B.1
C.2
D.3
E.4
第2题:
现有:
1.abstractclassColor{
2.protectedabstractStringgetRGB();
3.}
4.
5.publicclassBlueextendsColor{
6.//insertcodehere
7.}
和四个声明:
publicStringgetRGB(){return"blue";}
StringgetRGB(){return"blue";)
privateStringgetRGB(){return"blue";}
protectedStringgetRGB(){return"blue";)
分别插入到第6行,有几个可以通过编译?()
第3题:
现有:
1.interfaceAnimalf
2.voideat();
3.}
4.
5.//insertcodehere
6.
7.publicclassHouseCatimplementsFeline{
8.publicvoideat(){}
9.}
和以下三个接口声明:
interfaceFelineextendsAnimal()
interfaceFelineextendsAnimal{voideat();}
interfaceFelineextendsAnimal{voideat(){}}
分别插入到第5行,有多少行可以编译?
第4题:
现有:1.abstractclassColor2{2.//insertcodehere3.}4.5.publicclassBlue2extendsColor2{6.publicStringgetRGB(){return"blue";}7.}和4个声明:publicabstractStringgetRGB();abstractStringgetRGB();privateabstractStringgetRGB();protectedabstractStringgetRGB();分别插入到第2行,有多少行可以编译?()
A.0
B.1
C.2
D.3
第5题:
现自:
1.interfaceColor{}
2.interfaceWeight{}
3.//insertcodehere
和以下足六个声明:
classBoatextendsColor,extendsWeight{}
classBoatextendsColorandWeight{}
classBoatextendsColor,Weight{}
classBoatimplementsColor,implementsWeight{}
classBoatimplementsColorandWeight{}
classBoatimplementsColor,Weight{}
分别插入到第3行,有多少行可以编译?()