New enumeration value in Java enumeration class reports error (traitor record)

The following error occurs when adding a new enumeration value to an enumeration class written by others:
An error occurs after adding an enumeration instance to an enumeration class written by someone else.

The main reason is that commas must be used to separate enumeration instances, and a semicolon is required for the last one.

The problem was successfully solved after changing the semicolon to a comma :

After changing the semicolon, the problem was successfully solved


Java enumeration common usage reference

Guess you like

Origin blog.csdn.net/qq_45699990/article/details/122410812