posted 13 years ago
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..
Thanks,
Gaurav.