Here you can find the source of copy(long[] array)
private static long[] copy(long[] array)
//package com.java2s; /******************************************************************************* * Copyright (c) 2015, 2016 Raymond Aug? and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w ww . j a va 2s . c om*/ * Raymond Aug? - bug fixes and enhancements ******************************************************************************/ import java.util.*; public class Main { private static long[] copy(long[] array) { if (array == null) { return null; } if (array.length == 0) { return array; } return Arrays.copyOf(array, array.length); } private static String[] copy(String[] array) { if (array == null) { return null; } if (array.length == 0) { return array; } return Arrays.copyOf(array, array.length); } private static <T> T[] copy(T[] array) { if (array == null) { return null; } if (array.length == 0) { return array; } return Arrays.copyOf(array, array.length); } private static int copy(int value) { return value; } private static long copy(long value) { return value; } private static boolean copy(boolean value) { return value; } private static String copy(String value) { return value; } }