我有以下类: 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;
}
}
虽然下面的实际执行