public static void main(String args[]){
int[] source = {1,2,3,4,5,6,7};
int[] target = new int[5];
System.arraycopy(source,0,target,0,5);// 6,7超出5的长度,被省略了
System.out.println(Arrays.toString(target));
for(int i = 0;i < target.length;i++){
System.out.print(target[i] + "\t");
}
}