If a method is declared as protected, where may the method be accessed?
Java Programming Language > Class, Object and Methods in java > About Java Tutorial
2440
Answer:
A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.
This Particular section is dedicated to Question & Answer only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.