如何为接口定义通用返回类型,以便它的实现类可以有自己的返回类型?
public interface A {
public <T> T doSomething();
}
public class ImplA implements A {
public SomethingElseA doSomething() {
return obj.doSomething();
}
}
public class ImplB implements A {
public SomethingElseB doSomething() {
return obj.doSomething();
}
}