The use of protected keyword to a member in a class will restrict its visibility as follows
Visible only inside the package
Visible only in the class and its subclass in the same package
Visible in all classes in the same package and subclasses in other packages
Visible only in the class where it is declared