Hi Akshay,
Good question....
The case here is of "Member Hiding". In your subclass you have hidden
String object of Superclass by giving the same name. But in
JAVA, only methods can be overridden and not the attributes. So, your superclass doesnt have any idea about Overridden String. When the control goes into the superclass, it just know its own copy of the variable. So it prints like that.
Again, want to quote one thing "Methods can be overridden, not the attributes".
Hope it will help
Regards,
Mausam