Actually, what happens when you provide an implementation when creating an enum object, you basically extend the Parent class with an additional method, i.e. Anonymous . Thus, it does not allow access to the private method of the Parent class, but allows protected and public .
enum A{ a{ @Override public void method() {
This should explain the explanation of @Override provided by eclipse.
source share