本帖最后由 zl78365336 于 2013-12-1 09:17 编辑
请问各位在主函数中如何调用这个枚举? ----------------------------------- public enum Lamp { RED("GREEN"),GREEN("YELLOW"),YELLOW("RED"); privateString next; privateLamp(String next){ this.next =next; } public Lamp nextLamp(){ returnLamp.valueOf(next); } }
|