Forward Reference of Type Parameter in Java Generics

后端 未结 2 1933
灰色年华
灰色年华 2021-02-09 22:46

According to Java Generics FAQ http://www.angelikalanger.com/GenericsFAQ/FAQSections/TypeParameters.html#FAQ302 a type parameter cannot be forward-referenced in this way

<
2条回答
  •  抹茶落季
    2021-02-09 23:27

    It is completely legal, say more, you can imagine that A extends C which is generally extends B. So what would you say about when C extends B?

提交回复
热议问题