I declared an instance enum with private/protected access modifier, The compiler did not flag any error. Whereas in the chapter one its mentioned that enums can only have public and default access. Can any one please clear my confusion?
If the enum declared out outside class then it should have only public or default access. Whereas, if the enum declared inside class then it may have private and protected too