MCQ
Single Best Answer
Easy
QThe use of protected keyword to a member in a class will restrict its visibility as follows:
ID: #24251
Elements of Accounting
42 views
Question Info
#24251Q ID
EasyDifficulty
Elements of AccountingTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option C
Explanation
The use of protected keyword to a member in a class will restrict its visibility as follows:
-
protected→ Accessible in:-
same package (all classes inside it) ✅
-
subclasses even in other packages ✅
-
So the correct answer is:
(c) visible in all classes in the same package and subclasses in other packages
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic