If a class is declared as public and contains a protected method, which of the following statements accurately describes the accessibility of that protected method?

Choose the correct answer

Explanation

A protected method in a public class can be accessed from inside the class itself as well as by any other class within the same package. It is not limited to subclasses only, nor is it accessible from classes outside the package unless they are subclasses.

If a class is declared as public and contains a prot… — Java concepts and its programming | PakQuizHub