a6511631 发表于 2014-8-13 10:42
public abstract TrafficLamp nextLamp()在每个枚举的元素中不是都实现了吗?抽象类没实现抽象方法,直接抛 ...
杨庆雷 发表于 2014-8-13 12:14
你的构造方法是私有的,也就是说不能被其他类继承(本来抽象类就不能被继承),你再写个抽象方法,我觉得没 ...
思维 发表于 2014-8-15 18:24
私有构造方法虽然不能被继承,但是抽象方法可以自我实现,保证元素的唯一性啊 ...
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |