Why does the private method of the parent class Base appear in the child class of the child in the code below?
public class Trial { class Base { private void foo() { } } class Child extends Base { private void func() { super.foo(); } } }
It would not be possible if the Base and Child classes were not inner classes. Why is this behavior for inner classes?
java inheritance inner-classes
victini
source share