您可以使用System.arraycopy https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#arraycopy(java.lang.Object,%20int,%20java.lang.Object,%20int,%20int) :
public static void arraycopy(Object src, int srcPos, Object dest, int destPos, int length)
这是一个简单的示例,您可以遵循它来解决您的问题:
double a[] = {1, 2, 3, 4, 5};
double b[] = {6, 7, 8};
int local = 5;
double result[] = new double[a.length + b.length];
System.arraycopy(a, 0, result, 0, a.length);
System.arraycopy(b, 0, result, local, b.length);
System.out.println(Arrays.toString(result));
Output
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0]