A类同时实现接口B和接口C,正确的写法是:
A: public class A implements B, implements C {...}
B: public class A implements B, C {...}
C: public class A interface B, iinterface C {...}
D: public class A extends B, C {...}
A: public class A implements B, implements C {...}
B: public class A implements B, C {...}
C: public class A interface B, iinterface C {...}
D: public class A extends B, C {...}
举一反三
- 假设C和D是接口,下列定义哪个是正确的() A: public class A implements C,D{ } B: public class A implements C implements D{ } C: public class A extends C,D{ } D: public class A extends C extends D{ }
- 下面哪些语法结构是不正确的( ) A: public class A extends B implements C B: public class A implement A B C: public class A implements B,C,D D: public class A implements B
- (1+X)假设 C 是抽象类,I1 和 I2 是接口。下列关于抽象类或接口的定义,哪一个是正确的( )。 A: public class A extends C implements I1,I2{} B: public class A extends I1,I2 implements C{} C: public class A implements I1,I2 extends C {} D: public class A extends C, I1, I2 {}
- 假设C是抽象类,I1和I2是接口。下列关于抽象类或接口的定义,哪一个是正确的? A: public class A extends C implements I1,I2{} B: public class A extendsI1,I2 implements C{} C: public class AimplementI1,I2extends C{} D: public class A extends C,I1,I2{}
- Which two demonstrate an “is a” relationship? () A: public interface Person{} public class Employee extends Person{} B: public interface Shape{} public class Employee extends Shape{} C: public interface Color{} public class Employee extends Color{} D: public class Species{} public class Animal (private Species species;) E: interface Component{} Class Container implements Component ( Private Component[ ] children; )