Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Znav
nextPass-by-Value Versus Pass-by-Reference
prevClasses Implementing Interfaces

As for interface inheritance, a class cannot redefine an operation or data member that it inherits from a base interface or class. For example:

Wiki Markup
{zcode:slice}
interface BaseInterface {
    void op();
};

class BaseClass {
    int member;
};

class DerivedClass extends BaseClass implements BaseInterface {
    void someOperation();       // OK
    int op();                   // Error!
    int  someMember;            // OK
    long member;                // Error!
};
{zcode}
Ztop
See Also
Zret
Znav
nextPass-by-Value Versus Pass-by-Reference
prevClasses Implementing Interfaces