Originally posted by shilpa Reddy:
How do you know that call() of test14 class is invoked....why call() of class just not invoked...why is that b is not getting initialized at the first time....do reply..thanks
The instance initializers and constructor of the superclass (in this case the no-arg constructor) are going to be called before the instance variables in the subclass are initialized (that is given their values by an instance initializer or subclass constructor).
In the superclass constructor there is a call to an overridden method. The
overridden method will be called, and at that point, the instance variables in the subclass have their default values, and that is why 0 is printed.
[ August 02, 2006: Message edited by: Keith Lynn ]