仪器社区

定义一个father和child类,并进行测试

yatou09100622 2015-01-28
评论
全部评论
新起点justdoit
class Father{
private String name = "zhangjun";
class Child{
public void introFather(){
System.out.println(name);
}
}
}

public class Test {
public static void main(String[] args) {
Father.Child c = new Father().new Child();
c.introFather();
}
}
3 0 2017-05-27 0条评论 回复
Q10久户花恋
定义一个father和child类,并进行测试?然后呢
19 0 2015-01-29 0条评论 回复
您可能感兴趣的社区主题
加载中...
发布 评论