class A {
private InnerA y;
protectedclass InnerA {
public InnerA() { System.out.println("A.InnerA()"); }
}
public A() {
System.out.println("New A()");
y = new InnerA();
}
}
class B extends A {
publicclass InnerB {
public InnerB() { System.out.println("B.InnerB()"); }
}
}
publicclass MainClass{
publicstaticvoid main(String[] args) {
new B();
}
}