Question: Which statement is true about the accessibility of members? Select the one correct answer. (a) A private member is always accessible within the same package.
Which statement is true about the accessibility of members?
Select the one correct answer.
(a) A private member is always accessible within the same package.
(b) A private member can be accessed only within the class of the member.
(c) A member with default accessibility can be accessed by any subclass of the class in which it is declared.
(d) A private member cannot be accessed at all.
(e) Package/default accessibility for a member can be declared using the keyword default.
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
b A private member is accessible only within the class of the member If no accessibi... View full answer
Get step-by-step solutions from verified subject matter experts
