package com.imooc; public abstract class Telphone { public abstract void call(); public abstract void message(); } package com.imooc; public class CellPhone extends Telphone { @Override public void call() { // TODO Auto-generated method stub } @Override public void message() { // TODO Auto-generated method stub } }
错误显示为
Multiple markers at this line
- implements com.imooc.Telphone.message
- The method message() of type CellPhone must
override or implement a supertype method
先保存,写完Tellphone类之后,先保存,再去新建子类就行了
只要重写一下就好了
两个错误,首先抽象类不能被继承,而要用implement,从抽象类过来的方法必须要重写