标签:int() stat nbsp str out sde void static ati
1、通过内部类调用外部类中的私有属性
1 class Outer{ 2 private String info = "hello"; 3 class Inner{ 4 public void print(){ 5 System.out.println(info); 6 } 7 } 8 public void fun(){ 9 new Inner().print(); 10 } 11 } 12 13 public class InnerClassDemo01 { 14 15 public static void main(String[] args) { 16 new Outer().fun(); 17 } 18 19 }
标签:int() stat nbsp str out sde void static ati
原文地址:http://www.cnblogs.com/XuGuobao/p/7242527.html