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.
This is a very basic behavior and I am posting just to make that I understand this properly:
The reason the output : 9 is that class members are not overridden like methods and the value of variable is determined by the type of reference variable.. Please correct, if I am wrong or missing something. If someone can explain more clearly the please post..