package com.imooc;
public class HelloWorld{
private int b = 8;
protected class HelloChina{
int b = 7;
public void show() {
System.out.println("访问外部类中的a:"+ Outer.this.b);
System.out.print("访问内部类中的b:" + b);
}
}
public static void main(String []args) {
HelloWorld hello = new HelloWorld();
HelloChina china = hello.new HelloChina();
china.show();
}
}
外部类的名字是HelloWorld,不是outer