Is it possible to reference a nested generic parameter in java?

前端 未结 5 870
孤街浪徒
孤街浪徒 2020-12-11 01:52

I\'m not sure what the technical term for this is, but consider an interface:

public interface SomeInterface {
     public T doSomething();
}
         


        
5条回答
  •  星月不相逢
    2020-12-11 02:06

    See if this suit your need:

    public interface SomeRelatedInterface {
         public  > T doSomethingRelated(D relative);
    }
    

提交回复
热议问题