Guava Ints concat() 函数
Guava’s Ints .concat() 方法用于将作为参数传递的数组合并成一个数组。该方法返回每个提供的数组的值,并将其合并为一个数组。例如,concat(new int[] {a, b}, new int[] {}, new int[] {c})
返回数组{a, b, c}。
语法:
参数:该方法接受 arrays 作为参数,代表零个或多个int数组。
返回值: 该方法返回一个单一的数组,包含源数组的所有值,按顺序排列。
示例1:
输出:
示例2:
输出:
参考: https://google.github.io/guava/releases/22.0/api/docs/com/google/common/primitives/Ints.html#concat-int:A…-