There is an other code:
It does not compile.
This code compiles. The class
Test inherits the public, static and final variable x; it has an instance varible x. In the first code it is not possible to have a static variable named x and an instance variable named x; it does not compile. I am looking for an explanation.