Enum is a public and static class . And only static and public variables are can call inside the main method.
Read moreCan enum have attributes?
An enum can, just like a class , have attributes and methods . The only difference is that enum constants are public , static and final (unchangeable – cannot be overridden). An enum cannot be used to create objects, and it cannot extend other classes (but it can implement interfaces).
Read moreHow do I create an enum variable?
If you just use #define to define constants used as values for some variable the debugger will show you the numer. With enum it can show you the names. And if you need a set of possible values (constants) for a single variable you can define it the way you showed.23 Mar 2010
Read more