If a method is declared as protected, where may the method be accessed

A protected method may only be accessed by classes or interfaces of the same package orby subclasses ofthe class in which it is declared.

Showing Answers 1 - 1 of 1 Answers

The classes or interfaces in which the method is declared can access the protected method.It can also be access within a class through member function and outside a class through public interface.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions