Java switch case 枚举enum报错:case expressions must be constant expressions
阅读更多1.问题描述今天在代码中想对Javaswitchcase和枚举类型Enum对象进行联合使用,但发现有Eclipse中异常提示信息:caseexpressionsmustbeconstantexpressions,导致编译始终过不去。枚举类型定义如下:publicenumTradeStatus{CLOSE(-1,"已关闭"),NO_TRADE(0,"未创建"),CREATE(1,"拍下"),