how to create the static enum like below
static enum Test{
employee-id,
employeeCode
}
As of now, I am getting errors.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is not possible with Java, because each item has to be a valid identifier (and valid Java identifiers may not contain dashes).
The closest thing would be adding a custom property to each enum value or override the
toStringmethod, so you can do the following: