package org.springframework;

/**
 * @author 秦林森
 */
public class Test {
    public static void main(String[] args) {
        int[] sourceArray = {1, 2, 3, 4, 5};
        int[] destArray={8,9,10,11,12,16};
        //改变目标数组
        System.arraycopy(sourceArray,1,destArray,3,3);
        for(int sourceElement:sourceArray){
            System.out.println(sourceElement);
        }
        //分割两次打印结果
        System.out.println("*************************");
        for(int destElement:destArray){
            System.out.println(destElement);
        }
    }
}

 

相关文章:

  • 2021-09-01
  • 2021-09-19
  • 2022-12-23
  • 2021-10-06
  • 2021-09-12
  • 2022-12-23
  • 2022-02-26
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2021-11-29
  • 2021-12-14
  • 2021-08-18
  • 2021-05-02
相关资源
相似解决方案