As I read from various Java book and tutorials, variables declared in a interface are constants and can\'t be overridden.
I made a simple code to test it
<
It is not overridden, but shadowed, with additional confusion because the constant in the interface is also static.
Try this:
A_INTERFACE o = new A_CLASS();
System.out.println(o.var);
You should get a compile-time warning about accessing a static field in a non-static way.
And now this
A_CLASS o = new A_CLASS();
System.out.println(o.var);
System.out.println(A_INTERFACE.var); // bad name, btw since it is const