/**
测试数组的拷贝
*/
public class TestArraycopy {
public static void main(String[] args) {
//System.arraycopy(src, srcPos, dest, destPos, length);
String[] s1 = {"aa", "bb" ,"cc", "dd", "ee"};
String[] s2 = new String[10];
System.arraycopy(s1, 2, s2, 6, 3);
//遍历
for(int i=0; i<s2.length; i++) {
System.out.println(i+"---"+s2[i]);
}
}
}