Java switch statement: Constant expression required, but it IS constant
I understand that the compiler needs the expression to be known at compile time to compile a switch, but why isn’t Foo.BA_ constant? While they are constant from the perspective of any code that executes after the fields have been initialized, they are not a compile time constant in the sense required by the JLS; … Read more