文件名称:javaabstractclassandinterfacedifferences
- 所属分类:
- JSP源码/Java
- 资源属性:
- [WORD]
- 上传时间:
- 2012-11-26
- 文件大小:
- 6kb
- 下载次数:
- 0次
- 提 供 者:
- 林*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
abstract class和interface是Java语言中对于抽象类定义进行支持的两种机制,正是由于这两种机制的存在,才赋予了Java强大的面向对象能力。abstract class和interface之间在对于抽象类定义的支持方面具有很大的相似性,甚至可以相互替换,因此很多开发者在进行抽象类定义时对于abstract class和interface的选择显得比较随意。其实,两者之间还是有很大的区别的,对于它们的选择甚至反映出对于问题领域本质的理解、对于设计意图的理解是否正确、合理。本文将对它们之间的区别进行一番剖析,试图给开发者提供一个在二者之间进行选择的依据。
-abstract class and interface is the Java language in the definition of abstract class for the support of two mechanisms, it is precisely because the existence of these two kinds of mechanisms, it gives a powerful object-oriented Java ability. between abstract class and interface defined in the abstract class for the support of great similarity, or even to replace each other, so a lot of developers in the definition of abstract class abstract class and interface for the choice is more arbitrary. In fact, there are still between the two very different, and even for their choice reflects the nature of the problem areas of understanding, the understanding of the design intent is correct, reasonable. In this paper, the distinction between them will carry out some analysis to try to provide a developer to choose between the two basis.
-abstract class and interface is the Java language in the definition of abstract class for the support of two mechanisms, it is precisely because the existence of these two kinds of mechanisms, it gives a powerful object-oriented Java ability. between abstract class and interface defined in the abstract class for the support of great similarity, or even to replace each other, so a lot of developers in the definition of abstract class abstract class and interface for the choice is more arbitrary. In fact, there are still between the two very different, and even for their choice reflects the nature of the problem areas of understanding, the understanding of the design intent is correct, reasonable. In this paper, the distinction between them will carry out some analysis to try to provide a developer to choose between the two basis.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
javaabstractclassandinterfacedifferences.doc