当前位置: 代码迷 >> 综合 >> 数组复制建议使用System.arraycopy()
  详细解决方案

数组复制建议使用System.arraycopy()

热度:0   发布时间:2024-01-28 04:42:18.0

在这里插入图片描述
System.arraycopy()源码如下:

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

可以发现,arraycopy是本地函数,一般来说本地方法的性能是会优于普通方法的。

  相关解决方案