下面是几条定义类的语句,不能被继承的类是
A: abstract class Figure
B: class Figure
C: public class Figure
D: sealed class Figure
A: abstract class Figure
B: class Figure
C: public class Figure
D: sealed class Figure
举一反三
- 下面是几条定义类的语句,不能被继承的类是( )。 A: abstract class Student {} B: class Student{} C: public class Student{} D: sealed class Student{}
- 下面类的定义,哪个是合法的抽象类定义? A: class A { abstract void unfinished() { } } B: class A { abstract void unfinished(); } C: abstract class A { abstract void unfinished(); } D: public class abstract A { abstract void unfinished(); }
- 下列类的定义中哪些是合法的抽象类?( ) A: sealed abstract class c1{abstract public void test() {} B: abstract sealed public viud test(); C: abstract class c1 { abstract void test(); //test()默认为私有,不合法 D: abstract class c1 {abstract public void test(); }
- 判断C#类MyClass的定义中哪些定义是合法的抽象类 A: abstract class Myclass{ abstract int getCount();} B: private abstract class Myclass{ abstract int getCount();} C: abstract class Myclass{ public abstract int getCount();} D: sealed abstract class Myclass{ abstract int getCount();}
- 假定类A已经定义,对于以A为基类的单一继承类B,以下定义中正确的是:( ) A: class B:public A{//...}; B: class A:public B{//...}; C: class B:public class A{//...}; D: class A:class B public{//...};