You really should consider creating a more reasonable title, and placing the question in the body of the post, instead of the title....
any one give be the explanation for the code above and y it prints the output as pare
Overridding applies to methods -- not to instance variables. So, when you call the say() method, it will execute the latest version. This latest version is in the parent class, which at compile time was coded to access the instance variable of the parent.
Henry
[ October 05, 2008: Message edited by: Henry Wong ]