Here you can find the source of copyOfArray(int[] a)
private static int[] copyOfArray(int[] a)
//package com.java2s; /*//www.j a v a2 s . co m * Copyright 2001-2008 Aqris Software AS. All rights reserved. * * This program is dual-licensed under both the Common Development * and Distribution License ("CDDL") and the GNU General Public * License ("GPL"). You may elect to use one or the other of these * licenses. */ public class Main { private static int[] copyOfArray(int[] a) { int[] result = new int[a.length]; for (int i = 0; i < result.length; i++) { result[i] = a[i]; } return result; } }