this.i refers to instance variable. Instance variable i is overridden in wine method to 10, hence 10 is the output. Incase if you print(i), 20 will be the output. since i represents local variable declared in wine method and has the value of 20. Hope it helps.
Joined: Feb 26, 2002
thanks i got it
Joined: Feb 07, 2005
I wanted to clarify my last remark.
When a static member of a class is referred to using a qualified instance, then it is irrelevant which instance refers to the static member.
The type of the class is what matters.
You create a local variable named i after you modify the static member i.