【发布时间】:2014-11-16 18:04:20
【问题描述】:
interface TestInterface {
void work();
}
class TestClass {
public void work(){
System.out.println("Work in CLASS");
}
}
public class Driver extends TestClass implements TestInterface {
public static void main(String[] args) {
new TestClass().work();
}
}
谁能给我解释一下,为什么仅仅因为TestClass中存在相同的工作方法签名,这个类编译得很好?
【问题讨论】:
标签: java interface overriding extends implements