这段代码有什么问题?
public class HelloWorld {
public static void main(String[] args) {
int[] a={4,3,2,5,1,8,6,7};
System.out.println(Arrays.toString(HelloWorld.split_array(a)[0])); //expect 4325 here
}
public static int[][] split_array(int[] a){
int [][] result={};
int mid = (int) (a.length)/2;
result[0] = Arrays.copyOfRange(a, 0, mid);
result[1] = Arrays.copyOfRange(a, mid, a.length);
return result;
}
}