411 REFERENCE · Wikibooks
Java Programming/Keywords/protected
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
is a Java keyword.
This keyword is an access modifier, used before a method or other class member to signify that the method or variable can only be accessed by elements residing in its own class or classes in the same package (as it would be for the default visibility level) but moreover from subclasses of its own class, including subclasses in foreign packages (if the access is made on an expression, whose type is the type of this subclass).
Syntax:
<returnType> <methodName>(<parameters>);
For example:
protected int getAge();
protected void setYearOfBirth(int year);
See also:
Java Programming/Scope#Access modifiers
deep