数组
7)数组的复制
7.1)System.arraycopy(a,1,a1,0,4);
//a:源数组
//1:源数组的起始下标
//a1:目标数组
//0:目标数组的起始下标
//4:要复制的元素个数
7.2)int[ ] a1 = Arrays.copyOf(a,6);
//a:源数组
//a1:目标数组
a = Arrays.copyOf(a,a.length+1); (扩容)
数组
7)数组的复制
7.1)System.arraycopy(a,1,a1,0,4);
//a:源数组
//1:源数组的起始下标
//a1:目标数组
//0:目标数组的起始下标
//4:要复制的元素个数
7.2)int[ ] a1 = Arrays.copyOf(a,6);
//a:源数组
//a1:目标数组
a = Arrays.copyOf(a,a.length+1); (扩容)