public static native void arraycopy(Object src, int srcPos,Object dest, int destPos,
int length);
实验代码:
public class ArrayTest08{
public static void main(String[] args){
int[] src = {2,3,4,5,6,7,8};
int[] dest = {10,11,12,13,14,15,16};
//把src中的4,5,6拷贝到dest数组从13开始.
System.arraycopy(src, 2, dest, 3, 3);
//遍历
for(int i=0;i<dest.length;i++){
System.out.println(dest[i]);
}//10.11.12.4.5.6 16
}
转载于:https://blog.51cto.com/hangtiangazi/1661771