This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
keyword 'this' refers to the current instance of the object. In the given program, you are printing this.i which refers to 'i' which is the member variable of the class and not local variable of the method. Hence, the output is 10 as the value of i is changed from 99 to 10 in the method. Also note, theres an implicit 'this' in statement i = 10 Read i=10 as this.i = 10