Link to home
Start Free TrialLog in
Avatar of cutie_smily
cutie_smily

asked on

cana class extend a class which is jar and added to a classpath

I have to extend a class which is in different package or which is in server.jar. Is that possible?
I am using eclipse, it does say its not finding parent class.
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cutie_smily
cutie_smily

ASKER

Thanks everybody
Base class Animal
sub class cow

Animal a=new cow();
a.speak(); //it says Animal does not have speak method.

Doesn't it get from subclass ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>Doesn't it get from subclass ?

If the method exist only in the subclass, there is no way the Animal class can point to that method which it not aware of, try object's comment.