Consider the following interface in Java:
public interface I { public final String KEY = 'a'; }
And the following class:
public class A implements I { public String KEY = 'b'; public String getKey() { return KEY; } }
Why is it possible for class A to come along and override interface I’s final constant?
Try for yourself:
A a = new A(); String s = a.getKey(); // returns 'b'!!!
Despite the fact that you are shadowing the variable it’s quite interesting to know that you can change final fields in java as you can read here: