Your code runs and compiles fine, but the reason is that the enum class has now default access. So you can only use it within your package.
If you want to use your enum outside your package. You must mark your enum public and this will give a compile error because in Java you can have only one public class in a file. In that case you have to define your enum outside the class.