Solve the Java “syntax error on token enum” problem

Reference:
http://stackoverflow.com/questions/8598661/eclipse-chokes-on-enum-even-though-compiler-compliance-level-is-1-6
http://ywj852752270.blog.51cto.com/4105805/1248526

“Why”
Enum is a Java reserved keyword, and in Java 1.4 and prior versions, warninig may be prompted at compile time to indicate that enum is a keyword and is not recommended. However, since Java version 1.5 an error will be reported: Syntax Error on token enum

“Address”
You can rename a variable named enum.
If it is inconvenient to modify, such as the old code can not work, this can be solved as follows.

The project is then rebuilt. If the syntax error on token enum error is also reported, the project is deleted from the workspace, then re-imported and rebuilt.

Read More: