public class Father {
private String name="shangjun";
class Child{
void intmFatcher(){
System.out.println(name);
}
}
}
public class Test {
public static void main(String[] args) {
Father f=new Father();
Father.Child c=f.new Child();
c.intmFatcher();
}
}
温馨提示:内容为网友见解,仅供参考