Guava – Shorts.concat()方法及实例
Shorts.concat() 是Guava库中Shorts类的一个方法,用于将多个数组的值连接成一个数组。 例如,concat(new short[] {a, b}, new short[] {}, new short[] {c} 返回数组{a, b, c}。
语法:
这里,数组代表零个或多个短数组。
返回值: 一个单一的数组,包含源数组的所有值,按顺序排列。
例子-1。
输出:
例子-2。
输出:
参考资料:
https://google.github.io/guava/releases/23.0/api/docs/com/google/common/primitives/Shorts.html#concat-short:A…-