EMZETT.
Login

protected

In short: protected allows access within the package and in subclasses.

In more detail: It is the level for elements that child classes inherit and may adapt but that are not meant for the whole world.

In Depth

public class Animal { protected String name; }
public class Dog extends Animal {
    void show() { System.out.println(name); }   // allowed
}

See access modifiers, inheritance, extends.

See also: Access Modifiers, Inheritance, extends, public