class Father {
private String name = "sun";
public Father() {
}
class Child {
public Child() {
}
public void introFather() {
System.out.println("My father'name is "+name);
}
}
}
class FatherTest
{
public static void main(String[] args) {
Father.Child c = new Father().new Child();
c.introFather();
}
}
帮忙看一下,这个程序格式和内容有问题吗? |
|