class ClassA {
    private int x = 100;
    ClassA() {
        InnerA innerA = new InnerA();
    }
    public class InnerA {                                       // 公有的内部类
        InnerA() {
            System.out.println("this is a public instance of InnerA");
        }
        void show() {
            x = x + 100;
            System.out.println("x = " + x);
         }
    }
}
public class Example4_16
{
    public static void main(String[] args) {
        ClassA a = new ClassA();                          // 创建一个外包类对象
        ClassA.InnerA innerA = new ClassA().new InnerA();    // 创建一个外包类的内部类对象
        innerA.show();                                   // 调用内部类的方法
    }
}
