In java explicit typecasting is allowed. Now if I have
1. Instance of Base class
2. Name of derived class

Can I call a method of a derived class object through the base
class instance.

theComponentApp = selAppComp[i].getInstance(); //Base class instance.

try{

        String compName = selAppComp[i].getComponentName(); //Derived
class Name.

        Vector template = (???)theComponentApp.templateInfo();
}  //What to do here? templateInfo is a function of Derived class..



----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to