/**
* @author wenhui
* @description 内部类使用
* @Date 2019/10/6
*/
public class Outer {
private String out_string = "out_string";
class Inner {
public void print() {
System.out.printf("print: %s", out_string);
}
}
public static void main(String[] args) {
Outer out = new Outer();
Outer.Inner inner = out.new Inner();
inner.print();
}
}