The function call is over ridden, so the super constructor calls the derived class call() function. At this point of time b is not initialized with 16 so it prints 0. I changed the function name from call to call_one in the base class.
when the base class contructor calls the method call() its actually this.call() (am i right?) so it should invoke the base class call method. why the call method from subclass is called?
please explain.
Post by:autobot
A tiny monkey bit me and I got tiny ads:
a bit of art, as a gift, that will fit in a stocking