Java基础——继承、方法重写、super、this、多态
一、继承
extends
如果Phone02类继承Phone类
public class Phone02 extends Phone{ 。。。}
二、方法重写
举例:如果父类中有call方法,可以在子类中重写它,加上override标识符方便查阅
三、super、this关键字
四、多态
extends
如果Phone02类继承Phone类
public class Phone02 extends Phone{ 。。。}
举例:如果父类中有call方法,可以在子类中重写它,加上override标识符方便查阅