1 int a[]={1,2,3,2}; 2 int b[]={4,2,90,8,98}; 3 int[] d3 = new int[a.length + b.length]; 4 System.arraycopy(a, 0, d3, 0, a.length); 5 System.arraycopy(b, 0, d3, a.length, b.length);
System.arraycopy的参数意义:(src, srcPos, dest, destPos, length)--(源数组,源数组开始位置,目标数组,目标数组开始位置,复制长度)
时间: 2024-10-14 05:00:09