class SuperA{
Integer a = 1;
class Test extends SuperA{
Integer a = 2;
Your class Testhas two independent instance variables named a. They are available as
this.a
and
((SuperA)this).a
This distinguishes them from methods where f(), defined in Test, overrides the value in SuperA, therefore Testdoes not have a version of the superclass.
source
share