Hi Chunky,
I have numbered the complete flow sequence of the program from #1 to #25 at the end of each line in the code.
I am sorry I could'nt get the line numbers in the code aligned up vertically for you, although i tried a few times.
The points to note are in line #17, you are assigning y to 4 and z to 5. You may wonder how, we can
assign y and z when they have not been yet declared. This is because, when a subclass has instance
fields, then before the control goes to the superclass, the fields in the subclass are all automatically
initialized to default values, that is 0 for integer values, 0.0 for float and double values and null for
object references.
Thereafter, in line #18, y is being declared. As y is already initialized to 4, no further assignment is
done. In line #19, z is assigned to 3, hence the value of z is changed from 5 to 3.
Hope that helps.
Niraj
[This message has been edited by niraj singh (edited March 10, 2001).]
[This message has been edited by niraj singh (edited March 10, 2001).]
[This message has been edited by niraj singh (edited March 10, 2001).]