Interface inheritance
From Wikipedia, the free encyclopedia
This article does not cite any references or sources. (October 2006) Please help improve this article by adding citations to reliable sources. Unverifiable material may be challenged and removed. |
In object-oriented programming, interface inheritance is type of inheritance wherein one or more classes share a set of messages. This sharing can be realized by agreement, as in Python, or by use of programming-language-specific machinery, as in Java.
Interface inheritance is considered the most important aspect of inheritance[citation needed]. It is often conflated with the notion of implementation inheritance in the object-oriented programming paradigm. There is, however, a subtle, but notable difference: the latter is less flexible than the former, as it is unamiable to encapsulation[citation needed].
In Java, this is the mechanism used when multiple inheritance is desired. Since Java does not support multiple inheritance, the implementation of multiple interfaces allows it to satisfy the "is-a" relationship for multiple "super"classes.