1

Suppose a class has public visibility. In this class we define a protected method. Which of the following statements is correct?

Correct Answer: This method is accessible from within the class itself and from within all classes defined in the same package as the class itself.

Make the most of this question

This page focuses on one JAVA MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

JAVA MCQs MCQ: Suppose a class has public visibility. In this class we define a protected method. Which of the following statements is correct? | Extra Education