Suppose i have a code as below :
class A { int a = 1; } class B extends A { int a = 2; } class C extends B { int a = 3;
Cast to A and then access the variable:
((A)this).a