Java Array Clone clone(final T[] array)

Here you can find the source of clone(final T[] array)

Description

Method to clone a array

License

Open Source License

Parameter

Parameter Description
array a parameter

Return

T[]

Declaration

public static <T> T[] clone(final T[] array) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*from   ww  w . j  av a 2 s  .  c o m*/
     * Method to clone a array
     * 
     * @param array
     * @return {@link T[]}
     */
    public static <T> T[] clone(final T[] array) {
        if (array == null) {
            return null;
        }
        return array.clone();
    }
}

Related

  1. clone(double[][] source)
  2. clone(final byte[] array)
  3. clone(final double[][] array)
  4. clone(final int[] original)
  5. clone(final T[] array)
  6. clone(final T[] array)
  7. clone(float[] array)
  8. clone(float[] f)
  9. clone(float[][] array)