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

enum should not be used as an identifier since it is a reserved keyword from source level 1.5 on_第1张图片


你可能感兴趣的:(enum should not be used as an identifier since it is a reserved keyword from source level 1.5 on)