How can a protected member of class be accessed by its subclass in different package with example?
Answers
Answered by
8
✨ Answer ✨
The protected access specifier can be accessed only within that class and the package in which it is defined. It cannot be accessed from anywhere outside the class. Moreover it is the default access specifier if you do not explicitly specify the access of a particular class.
Explanation:
✨ hope it helps you.
silentLOVER.❤️
Similar questions