/* 内部类实现访问类的私有属性info
class Outer
{
private String info="hello world";
class Inner{
public void print(){
System.out.println(info);
}
};
public void fun(){
new Inner().print();
}
};
*/
class Outer
{ //类内部直结访问私有属性info
private String info="hello world";
//class Inner{
// public void print(){
// System.out.println(info);
// }
//};
public void fun(){
//new Inner().print();
System.out.printfln(info);
}
};
public class InnerClass{
public static void main(String[] args){
new Outer().fun();
}
}