+ 1
how to make enum?
2 ответов
+ 5
Depends on the language. You usually type the key word
enum
followed by its name, e.g.
Weekdays
and then you specify in curly braces the values it can take, for example
enum Weekdays {
MONDAY,
TUESDAY,
etc.
}
The values are usually written in uppercase to signal that they are constants. Here is an example in Java:
https://www.sololearn.com/learn/Java/2174/
+ 2
First, use google. If there is something you couldn't understand with the answer you found, or if you couldn't find an answer, then come here and ask.
So with this way, on the other hand, you do improve your searching skills.