摘要: 如果父类没有无参的构造方法,子类的两个构造方法都会报错,会有提示错误,除非子类明确用了父类的有参构造方法 如果 父类没有带参数的构造方法,则会自动调用系统默认为父类添加的无参的构造方法 阅读全文
posted @ 2017-05-08 16:46 antball 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 输出的结果: 输出: static Astatic B main start static TestHolderI'm A classHelloAI'm B classHelloB main end 阅读全文
posted @ 2017-05-08 16:33 antball 阅读(213) 评论(0) 推荐(0) 编辑