java - How to add special character in enum? -
I have a problem here. I have created a special careerfield java - an enum square which will list some special characters.
In my eclipse on this line: Please help in advance thanks. Do something like this, Special Protected Field. Java
package bp.enumfield; Public Emma Special Character Field {+, #; }
Public Enemy Special Character Field { there is an error in it: it says:
Syntax error, Completing EnumDeclaration Please enter "EnumBody" for
public enum Special Character Field {PLUS ( "+"), Hash ("#"); Private string value; Private Special Character field (string value) {this.value = value; } Public string toString () {return.value; // it will come back, # or +}}
Comments
Post a Comment