protected 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 not 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).
protected int getAge();
protected void setYearOfBirth(int year);
Last modified on 15 March 2013, at 11:59