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

 

posted @ 2018-11-07 15:54  偷懒曦  阅读(715)  评论(0编辑  收藏  举报