下面关于子类继承父类,正确的是( )。
A: public class Student extends People{}
B: public class Student implements People{}
C: public class Student extends Teacher People{}
D: 以上都不正确
A: public class Student extends People{}
B: public class Student implements People{}
C: public class Student extends Teacher People{}
D: 以上都不正确
举一反三
- 下面声明正确的是( )。 A: abstract final class Student{} B: public abstract class Student{} C: class Student extends Person,Parent{} D: private class Person{}
- 对于下列代码,下列哪个叙述是正确的 class People { People(int m) { } } class Student extends People { }
- 假设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
- 下面是几条定义类的语句,不能被继承的类是( )。 A: abstract class Student {} B: class Student{} C: public class Student{} D: sealed class Student{}