想要定义一个接口ServerImg,下列语句哪一项是正确的( )
A: public class ServerImg{}
B: public interface ServerImg{}
C: public class ServerImg(){}
D: public interface ServerImg(){}
A: public class ServerImg{}
B: public interface ServerImg{}
C: public class ServerImg(){}
D: public interface ServerImg(){}
举一反三
- 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: extends B: class C: interface D: public
- 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 {...}
- Java中使用( )关键字来定义接口。 A: public B: Class C: class D: interface
- 有一段程序代码如下,以下哪个选项中的语句是正确的。 public interface A { } public class B implements A { } public class C extends B { }