enum should not be used as an identifier since it is a reserved keyword from source level 1.5 on

问题描述:

在Java代码中将变量名命名为enum,导致Eclipse报错:

'enum' should not be used as an identifier since it is a reserved keyword from source level 1.5 on

解决办法:

在工程属性中,将 Compiler compliance level 降为1.4,并且 Use default compliance settings

猜你喜欢

转载自www.cnblogs.com/chenxi-hxl/p/9923026.html