Znav |
---|
next | Pass-by-Value Versus Pass-by-Reference |
---|
prev | Classes 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} |
See Also
Znav |
---|
next | Pass-by-Value Versus Pass-by-Reference |
---|
prev | Classes Implementing Interfaces |
---|
|