Mycode is
public enum PartsOfSpeech2 {
n("noun"),
wp("标点"),
a("adjective"),
d("conjunction"),
...;
which I want
public enum PartsOfSpeech2 {
n("noun"),
wp("标点"),
a("adjective"),
d("conjunction"),
%("noun");
can I hava a default value which is not in it, can it be set as a default value? because I have a type is "%", but enum is not support %, so I want a default value to solve it
enumis to have a discrete list of items from which you can select. If you want to use something which is not in the enumeration then you might want to look into using something else. Can you please provide a use case as to what you are trying to achieve?