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.
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..