Here you can find the source of copyArray(int[] ar)
public static int[] copyArray(int[] ar)
//package com.java2s; //License from project: Apache License public class Main { public static int[] copyArray(int[] ar) { int[] r = new int[ar.length]; System.arraycopy(ar, 0, r, 0, ar.length); return r; }/*from w ww . ja va 2 s . c o m*/ }