可以数组拷贝。比如Integer数组
int[] a = new int[n];
int[] b = new int[m];
int[] newArray = new int[n+m];
System.arraycopy(a, 0, newArray, 0, a.length);
System.arraycopy(b, 0, newArray, a.length, b.length);
int[] a = new int[n];
int[] b = new int[m];
int[] newArray = new int[n+m];
System.arraycopy(a, 0, newArray, 0, a.length);
System.arraycopy(b, 0, newArray, a.length, b.length);