Here you can find the source of clone(int[] array)
Parameter | Description |
---|---|
array | the array to clone |
public static int[] clone(int[] array)
//package com.java2s; public class Main { /**/* ww w . jav a 2s. co m*/ * Return a clone of the given int array. No null checks are performed. * * @param array the array to clone * @return the clone of the given array */ public static int[] clone(int[] array) { int[] result = new int[array.length]; System.arraycopy(array, 0, result, 0, array.length); return result; } }