摘要: 1.通过super()调用父类的有参构造方法,super语句必须是子类构造函数的第一句。父类中使用了默认的构造方法或者有无参的构造方法,子类的构造函数会自动调用。classGrandparent{publicGrandparent(){System.out.println("GrandParentC... 阅读全文
posted @ 2015-11-09 21:18 waitingforyou123 阅读(160) 评论(0) 推荐(0) 编辑