Return
Simulating multiple inheritance in Java
DOI:10.1016/S0164-1212(00)00061-3.png)
Abstract
En 中文
Multiple inheritance is a feature whose worth has been vigorously debated, and even now there is no agreement as to whether a language should include it. Java does not have multiple inheritance, but its designers claim that many of the benefits of multiple inheritance can be gained through the use of a new feature, the interface. In this paper we explore the claims of the Java designers, and show how the interface may be used to simulate multiple inheritance. We first discuss the benefits of inheritance and multiple inheritance, and then demonstrate how the need for them arises in program development, using an extended example based on a real application. We then present the technique for simulating multiple inheritance, showing how it allows the main benefits of multiple inheritance to be achieved in Java. Finally, we discuss the limitations of the approach. In particular, we show how the approach faces difficulties when used with class libraries, such as the Java Core API, and we suggest a convention for Java class library designers that will mitigate this problem. (C) 2000 Elsevier Science Inc. All rights reserved.
AI Summary
Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.
Journal
IF:
4.1
Papers:
5.4K
Citations:
8.4K
Organization
No organization information available

