我有以下類: public abstract Foo {
Foo() {}
public abstract Foo doSomething();
public static Foo create() {
return new SomePrivateSubclassOfFoo();
}
}
我想將其更改爲以下定義: public abstr
爲什麼不下面的代碼生成編譯時未檢查警告: class Parent {
public List method(){
return null;
}
}
class Child extends Parent {
public List<String> method() {
return null;
}
}
雖然下面的實際執行