I cannot call method2 on the obj as it is not defiened in the abstract class though its there in TestConcrete. If I make the refernce type as interface Testif still I cannot call method2 even though the reference points to TestConcrete.
As far as I understand the method calls are made on the type of the object the reference points to and not on the class type of the reference. So why are these calls not possible ? Why can I call only those methods that are declared in the interface / abstrace class ?
As far as I understand, the compiler knows the object only as the label you gave it when you named it, which was TestAbs in the case of obj. What constructer you used is all well and good, but to the compiler it IS a TestAbs. The solution is easy; just add a typecast, i.e.
-Joe [ May 27, 2004: Message edited by: Joseph George ]
I've heard it takes forever to grow a woman from the ground