I am taking Whizlabs exams. I got one enum related question. Enum is in the class. They have written in answer description that " enum declared in a class so it is static member of a class". As per I know enum values are static. How can be the enum static? CAn anyone please explain?
Joined: Apr 22, 2006
Enum declared inside a class become static member of that class, just like static nested classes. So no instance of the enclosing class is required to create such enum, just class name.