Call protected method from a subclass of another instance of different packages
I want to invoke a protected method of another instance from within a subclass of the class providing this protected method. See the following example: public class Nano { protected void computeSize() { } } public class NanoContainer extends Nano { protected ArrayList<Nano> children; } public class SomeOtherNode extends NanoContainer { // {Nano} Overrides protected void computeSize() { for (Nano child: children) { child.computeSize(); // << computeSize() has protected access in nanolay.Nano } } } javac tells me that computeSize() has protected access in Nano . I can't see the reason for this