如何将new值添加到 Java 中的枚举中?
这是我的枚举:
public enum AgentProspectStatus
{
loose("loose"),
on_progress("on_progress"),
reached("reached"),
alumni("alumni"),
student("student"),
new("new"); // This throws an error
private String code;
AgentProspectStatus(String code)
{
this.code = code;
}
}
Run Code Online (Sandbox Code Playgroud)
该new("new")行显示错误:
意外的标记