黄舟2017-04-18 10:41:07
<T> List<T>
是泛型的写法。表示这是一个泛型方法,T
是参数类型。Object... params
is an indefinite parameter. You can pass one, multiple or no parameters. It can be regarded as an array.
迷茫2017-04-18 10:41:07
The former is a generic type, and the params parameter is an object array
阿神2017-04-18 10:41:07
The first <T> is to declare that the letter T represents a certain type (generic) in this method. Of course, you can also use E, K, A, etc. It is customary to use T, K, E more often.
The second <T> uses the generic defined by this method as the return value.
Object...param means passing in one or more parameters of Object type. You can also say that you pass in an Object array