Declaration And Access Control - Study Mode
[#26] What access modifier allows a class member to be accessed from any class in the same package or any subclass?
Correct Answer
(C) public
[#27] In Java, which access modifier allows a class member to be accessed from any class, even outside the package?
Correct Answer
(A) public
[#28] What keyword is used to declare a method that is implemented in a subclass to provide a specific implementation?
Correct Answer
(A) abstract
[#29] In Java, what is the purpose of the final keyword when applied to a method?
Correct Answer
(C) It makes the method constant.
[#30] Which access modifier allows a class member to be accessed from any class in the same package but not from outside?
Correct Answer
(D) default