下面声明正确的是( )。
A: abstract final class Student{}
B: public abstract class Student{}
C: class Student extends Person,Parent{}
D: private class Person{}
A: abstract final class Student{}
B: public abstract class Student{}
C: class Student extends Person,Parent{}
D: private class Person{}
举一反三
- python中,下列哪种语法表示Student从Person中继承。( ) A: class Student: Person B: class Student extends Person C: class Student (Person) D: class Student: class Person
- 下面是几条定义类的语句,不能被继承的类是( )。 A: abstract class Student {} B: class Student{} C: public class Student{} D: sealed class Student{}
- 下列哪个类声明是正确的 ( ) A: abstract class G2 extends superClass1,superClass2{...} B: abstract public class classmates{...} C: public final class NewClass extends superClass implemnets Interface1{...} D: public abstract class String{...}
- class Person{} class Student extends Person{ public int id; public int score; public String name; public int getScore() { return score; }
- 关于类的声明,以下正确的是() A: abstract final class A{} B: abstract private A(){} C: protected private A D: public abstract class A{}