posted 17 years ago
Hi,
First when t.method is called, since the method is static the type is resolved at compile time and so method of base class is called and prints 1.
In the next line the refernce "t" is cast to the sub class type and so the method of subclass is called and prints 0.
So the output is 1 0
Regards,
Chaitra