The use of protected keyword to a member in a class will restrict its visibility as follows

  1. Visible only inside the package

  2. Visible only in the class and its subclass in the same package

  3. Visible in all classes in the same package and subclasses in other packages

  4. Visible only in the class where it is declared


Correct Option: C

Find more quizzes: