Java 泛型

发布时间:2019-11-19 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了Java 泛型脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

简介

Object &amp; <?> & <T>

<T> T

reference

public static <T> List<T> backwards (List<? super T> input) {          List<T> output = new ArrayList<T>();          return output;   }
<T>
I'm declaring an arbitrary @H_777_69@type T for this method, which can be anything (non-PRimitive) for each call of the method.
List<T>
This method will return a List containing elements of that type T.
List<? super T> input