标签: java enums
我有各种操作的枚举,我想遍历枚举Operations
Operations
public enum Operations { create,update,delete,view,compare,login }
我怎样才能实现这个目标?
答案 0 :(得分:49)
for (Operations op : Operations.values()) { ... }