Day 13 抽象类,接口

一:抽象类 abstract: 1,若是一个方法用abstract修饰,那么这个方法是不能有方法体的,这个称之为【方法的声明】一个方法若是用abstract修饰,【要求继承该类的子类必须重写这个方法】 2,若是一个类中存在用abstract修饰的方法,那么这个类必须abstrac修饰The type Hero must be an abstract class to define abstract
相关文章
相关标签/搜索