Interface Inheritance
Interfaces can inherit from other interfaces, in a similar way in which classes may inherit from other classes. The syntax and semantic of interface inheritance is very similar to that of class inheritance. If interface D inherits from interface B, it is said that D extends B, or D is a specialization of B. D is the derived interface; B is the base interface. If a class implements the derived interface D, then it must implement all methods of both D and B.
NOTE
Interfaces do not inherit from the Object base class. They actually do not inherit from anything, unless another interface is specifically mentioned.
There is one major difference from class inheritance: Interface inheritance can be multiple. That is, one interface ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access