In Java 9, I can write code like this:
enum Abc {
A, B, C;
static protected int foo = 4; // what is the purpose of the protected variables like this in enum?
}
I think it makes no sense, because we cannot inherit or implement an enum.
Edit: This question is the same with Why are protected members allowed in final java classes?