下列选项中的接口声明正确的是______。
A: interface Shape{...}
B: abstract private interface Shape extends Area{...}
C: private interface Shape{...}
D: protected privated interface;
A: interface Shape{...}
B: abstract private interface Shape extends Area{...}
C: private interface Shape{...}
D: protected privated interface;
举一反三
- 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; )
- 下面()是正确的接口定义。 A: interface A{void print(){};} B: abstract interface A extends I1,I2{abstract void print(){};} C: abstract interface A{print();} D: interface A {void print();}
- 以下接口的定义是正确的。 A: interface A{voidprint() { };} B: abstract interface B{voidprint();} C: abstract interface C extends A,B{abstract void print(){ };} D: interface D{void print();}
- 下列关于interface(接口)的说法正确的是:() A: interface中可以有private方法 B: interface中可以有final方法 C: interface中可以有方法实现 D: interface可以继承其他interface
- 在使用interface声明一个接口时,只可以使用()修饰符修饰该接口。 A: private B: protected C: private protected D: public