java 多数组合并
/**
* 数组合并
* @param a 要合并的数组
* @return 生成的新数组
*/
private static String[] concat(String[]... a) {
int newArray = 0;
if (a != null) {
for (String[] strings : a) {
newArray += strings.length;
}
String[] c = new String[newArray];
int temp = 0;
for (String[] strings : a) {
System.arraycopy(strings, 0, c, temp, strings.length);
temp += strings.length;
}
return c;
}
return null;
}