Question OOP-ENC-0047
MediumWhich Java access modifier lets a member be used by subclasses in other packages but not by unrelated classes there?
- A.
private
- B.
protected
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Encapsulation question
Which Java access modifier lets a member be used by subclasses in other packages but not by unrelated classes there?
private
protected
Sign up free to see the answer and a step-by-step explanation.
public
default (package-private)