| Inheritance |
| |
| Extending Interfaces |
| |
| When one interface inherits from another interface,
that "subinterface" acquires all the method definitions
and constants that its "superinterface" defined. |
| |
| To extend an interface, we use the extends keyword just as you do in a class definition: |
public interface Fruitlike extends Foodlike
{
...
} |
| |
| |
| In multiply inherited interfaces, the rules for managing
method name conflicts are the same as for classes that use
multiple interfaces; methods that differ only in return
type will result in a compiler error. |
| |
|
|
| |
| |