This prints DeerReinDeer,false.
I understand why it prints DeerReinDeer (fist invoke super() and then the sub class ReinDeer constructor). Can you help me understand why it prints the false ? Since the reference variable deer is pointing to the ReinDeer object , i was expecting it to invoke the hasHorns method in ReinDeer and print true. I know the fact that hasHorns is declared private in Deer has something to with it (i change that modifier to public and it did print true), but not sure why.