You want a class to have access to members of another class in the same package. Which is the most restrictive access that accomplishes this objective?()
A: public
B: private
C: protected
D: transient
E: default acce
A: public
B: private
C: protected
D: transient
E: default acce
举一反三
- You want a class to have access to members of another class in the same package. Which is the most restrictive access that accomplishes this objective?() A: public B: private C: protected D: transient E: default access
- You want to limit access to a method of a public class to members of the same class. Which access accomplishes this objective?() A: public B: private C: protected D: transient E: default access
- 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
- 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 public A C: protected class A D: private class A