Link to home
Start Free TrialLog in
Avatar of eugeneng
eugeneng

asked on

how to implement pure virtual function in java ?

how to implement pure virtual function in java as we can do in c?

class baseclass
{
    protected:
       virtual void Func1()=0;

}

class derivedclass : public baseclass
{
protected:
   void Func1()
   {
      :
   }
}
Avatar of ia_ia_ia_1
ia_ia_ia_1

Implement an abstract method...
ASKER CERTIFIED SOLUTION
Avatar of ia_ia_ia_1
ia_ia_ia_1

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
All methods of an interface are also abstract...
Methods in Java are all virtual (in general).
And "pure virtual" corresponds to "abstract" here - that is, no implementation provided.
Is there something more you'd like to know on this topic?
Avatar of eugeneng

ASKER

that's great, thanx mate!!