This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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.