数组小知识点

:空格

:换行

public static int[] copyOf(int[] original, int newLength) {
int[] copy(目标数组) = new int[newLength(数组长度)];
System.arraycopy(original(原数组), 0(从原数组什么位置开始拷贝), copy(拷贝), 0(从目标数组什么位置开始放),

//Math.min(original.length, newLength):长度,取最小值,原数组和新数组那个新的和原数组

Math.min(original.length, newLength));
return copy;
}

原文地址:https://www.cnblogs.com/Koma-vv/p/9347866.html