posted 19 years ago
Let's try to go step by step.
First, we have this, which executes the constructor for A:
Then, we execute this line, which causes use to create a new A object and a new B object:
Next, we execute this line of code, which uses the original A object that we created, which has the name A0, and creates a new B object.
Finally, we execute what really boils down to the same line as the last one. We create a new B object, but we use the original A object.
That gives the total output of A1B0A0B1A0B2.
I hope that helps,
Corey