Consider the following example code
class MyClass {
public String var = \"base\";
public void printVar() {
System.out.println(var);
}
}
In java, this is by design. Because, the set up of fields to be dynamically resolved would make things to run a bit slower. And in real, there's not any reason of doing so. Since, you can make your fields in any class private and access them with methods which are dynamically resolved.
So, fields are made to resolved better at compile time instead :)