首页 | 本学科首页   官方微博 | 高级检索  
     

Java语言中模拟多重继承的研究与实现
引用本文:肖海峰,毋国庆,王敏. Java语言中模拟多重继承的研究与实现[J]. 计算机工程与应用, 2002, 38(20): 123-125,193
作者姓名:肖海峰  毋国庆  王敏
作者单位:武汉大学软件工程国家重点实验室,武汉,430072
摘    要:文章通过比较Java与 C++在多重继承问题上的异同,分析了Java语言不支持多重继承的原因,并使用三种主要技术:转发、接口和向后引用给出了对多重继承的模拟,从而不但实现了多重继承的功能而且提供了比多重继承更简单、灵活,而且更强劲的功能。

关 键 词:多重继承  单重继承  向后引用  接口  转发
文章编号:1002-8331-(2002)20-0123-03

A Research of Multiple Inheritance and Realization in Java
Xiao Haifeng Wu Guoqing Wang Min. A Research of Multiple Inheritance and Realization in Java[J]. Computer Engineering and Applications, 2002, 38(20): 123-125,193
Authors:Xiao Haifeng Wu Guoqing Wang Min
Abstract:This paper presents the reasons why Java does not support multiple inheritance of classes by comparing the difference of multiple inheritance between Java and C .It also realizes the simulation of multiple inheritance in Java by joint use of three main methods: forwarding, interfaces and back-references.So the functions of multiple inheritance are not only realized,but also a more simple,more flexible and more strong functions than multiple inheritance which are provided in Java.
Keywords:multiple inheritance  single inheritance  back-references  interface  forwarding  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号