标签:复制 for java void [] 开始 highlight logs static
class Main{
public static void main(String args[]) {
int a[] = new int[] { 1, 2, 3, 4, 5 };
int b[] = new int[5];
//write your own codes
System.arraycopy(a, 0, b, 0, a.length);
for (int i = 0; i < b.length; i++) {
System.out.println(b[i]);
}
}
}
*****************************************************************************
System.arraycopy(要复制的数组,从第几个开始复制,需要粘贴到的数组,从那个位子开始粘贴,需要复制几个数);
标签:复制 for java void [] 开始 highlight logs static
原文地址:http://www.cnblogs.com/lijunzone/p/6683570.html