Singleton Collection To Multiple Object Collection

This question already has an answer here:

  • Initialization of an ArrayList in one line 32 answers

  • A singleton list has only 1 element by definition. If you want a list with multiple elements, you can use Arrays.asList() :

    inputInput.setCsvInstance(Arrays.asList("5.656346", "2.43485744", ...));
    
    链接地址: http://www.djcxy.com/p/27718.html

    上一篇: 有没有办法在一行中做到这一点?

    下一篇: 单身收集到多个对象收集