編譯器報錯
package moblie;
public abstract class Telephone {
public abstract void call();
public abstract void message();
}
package moblie;
public class Cellphone extends Telephone {
@Override
public void call() {
// TODO Auto-generated method stub
System.out.println("通過鍵盤打電話");
}
@Override
public void message() {
// TODO Auto-generated method stub
System.out.println("通過鍵盤發(fā)短信");
}
}
這是我全部代碼 但是編譯器報錯 說
The method call() of type Cellphone must override or implement a supertype method
怎么回事?
2016-03-20
package com.java.test;
/*
?* 你有沒有寫測試類 ?這個是可以運行的
?*?
?*?
?*/
public class Test {
public static void main(String[] args) {
// TODO Auto-generated method stub
Telephone t = new Cellphone();
t.call();
t.message();
}
}
2016-03-20
看下 main函數(shù)里面的內(nèi)容
2016-03-20