Home  >  Q&A  >  body text

java代码段疑惑

PHP中文网PHP中文网2711 days ago304

reply all(4)I'll reply

  • 黄舟

    黄舟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.

    reply
    0
  • 迷茫

    迷茫2017-04-18 10:41:07

    The former is a generic type, and the params parameter is an object array

    reply
    0
  • 阿神

    阿神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

    reply
    0
  • PHPz

    PHPz2017-04-18 10:41:07

    No problem as mentioned above

    reply
    0
  • Cancelreply