I\'m training for a Java exam, and I\'ve come across something I don\'t understand in last year subject. Here is the code
class Mother { int var = 2; in
m = new Daughter();
Though you have created a daughter object, you are referring that object with Mother m reference. So, any call using m will call the Mother class members, not daughter's
daughter
Mother m
m