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
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.
- Solve the problem of shell script “syntax error near unexpected token `fi’”.
- Solve the problem of syntax error: unexpected end of file or syntax error near unexpected token ` fi ‘error
- syntax error near unexpected token `then’ problem solution
- About writing [if] and [else] statements in JSP, Syntax error on token “else”, delete this token
- Syntax error on token “}“, delete this token
- Docker machine install syntax error near unexpected token ‘newline’! DOCTYPE HTML problem resolution
- Solve the problem of syntax error: invalid syntax in PIP install XXX
- Syntax error on token “eat”, identifier expected after this token
- [resolved] error: Java: illegal character: ‘\ ufef’ or error: Java: class, interface or enum required
- Uncaught syntax error: unexpected token ‘< 0‘
- Syntax error: unexpected token in uni app project compilation
- syntax error on token “catch”，Identifier expected
- Shell script syntax error near unexpected token ‘$’Do
- Syntax error near unexpected token `newline’script cannot be executed
- syntax error near unexpected token `else’
- Syntax error near unexpected token ‘$’Do is reported when running bash file
- Front end project runtime prompts syntax error: typeerror: token.type.endswith is not a function solution
- Shell script execution error: “syntax error near unexpected token”
- How to solve the problem of syntax error: (Unicode error)’unicodescape ‘codec can’t decode bytes in position 2-3: truncat