摘要: public static void main(String[] args) { Artist artist; artist = new ViolinArtist();//(向上转型)ViolinArtist为子类,父类引用子类对象 损失自己特有的属性和方法 artist.make();//调用的子类的方法 //artist... 阅读全文
posted @ 2016-08-08 17:52 早上~得~喝粥 阅读(675) 评论(0) 推荐(0)
摘要: 父类中用get方法,子类中super获取。 阅读全文
posted @ 2016-08-08 17:25 早上~得~喝粥 阅读(279) 评论(0) 推荐(0)