Yeah, if enum is public, it must be placed in an independent file, while enum definition can come under a class too.
This is the rule that in a file there can be at most one public class. So therefore if enum is public and not inside the class definition it must be kept in an independent file. Inside the class definition it can be private or protected or public. But independently only public can be used, no modifier default access as usually.