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.
Mahtab Alam wrote:A bit explanation will help , still didn`t get it
In the previous line you set x to 12... Notice that you did *NOT* declare a local variable, nor is there an instance variable in the subclass -- so the compiler is smart enough to know that you mean to set the instance variable that was declared in the super class.