Here you can find the source of copy(T[] array)
public static <T> T[] copy(T[] array)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static <T> T[] copy(T[] array) { return Arrays.copyOf(array, array.length); }/* w w w . ja va 2 s.co m*/ }