Which of the following classes cannot be extended?().
A: class A { }
B: class A { private A();}
C: final class A { }
D: class A { protected A();}
A: class A { }
B: class A { private A();}
C: final class A { }
D: class A { protected A();}
举一反三
- 关于类的声明,以下正确的是() A: abstract final class A{} B: abstract private A(){} C: protected private A D: public abstract class A{}
- 下列哪个类声明是错误的? A: class A B: public class A C: final class A D: private class A
- 下列哪个类的声明是正确的?( ) A: class A B: class public A C: protected class A D: private class A
- 下面哪个类声明是正确的( ) A: abstract final class A; B: abstract private move(); C: protected private number; D: public class B;
- Which one of the following statements is wrong about inheritance? ( ) A: Inheritance is one of the features of OOP B: Protected members of a class can be inherited C: The inheriting class is called a subclass D: Private members of a class can be inherited and accessed