编程语言
首页 > 编程语言> > Java System.arrayCopy

Java System.arrayCopy

作者:互联网

用了几次都没记住用法,发文记一下

public static native void arraycopy(Object src,  int  srcPos,
                                        Object dest, int destPos,
                                        int length);

src – the source array.
srcPos – starting position in the source array.
dest – the destination array.
destPos – starting position in the destination data.
length – the number of array elements to be copied.

Object src 要复制的对象

int srcPos 指定复制数组的起始位置

Object dest 目标对象

int destPos 指定要复制的内容,复制到目标数组的位置

int length 代表要复制的内容到 dest 数组的长度,该数值不能超过 dest.length - desPos

标签:Java,int,Object,System,srcPos,dest,length,array,arrayCopy
来源: https://blog.csdn.net/weixin_40392053/article/details/120242891