Abstract class (抽象类): 没有instance.
abstract class:可以包含abstract method,也可以包含非abstract method;非abstract method可以实现。
abastract method:只能定义在abstract class中; 不能被重载;
需要定义一个sub class,只有在sub class才可以redefine 这个abstract method.
Final class:阻止继承,也就是不能做superclass.
Finanl method :不能redefine.
本文详细解析了抽象类和最终类的概念及其使用方法。抽象类不实例化,可包含抽象方法与非抽象方法;抽象方法需在子类中重新定义。最终类防止继承,而最终方法不可重新定义。

863

被折叠的 条评论
为什么被折叠?



