Java Array Clone clone(Object[] array)

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

Description

clone

License

Open Source License

Declaration

public static Object[] clone(Object[] array) 

Method Source Code

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

public class Main {
    public static Object[] clone(Object[] array) {
        return array == null ? null : (Object[]) ((Object[]) array.clone());
    }//from   w  w w  . j  av  a  2s . com

    public static long[] clone(long[] array) {
        return array == null ? null : (long[]) ((long[]) array.clone());
    }

    public static int[] clone(int[] array) {
        return array == null ? null : (int[]) ((int[]) array.clone());
    }

    public static short[] clone(short[] array) {
        return array == null ? null : (short[]) ((short[]) array.clone());
    }

    public static byte[] clone(byte[] array) {
        return array == null ? null : (byte[]) ((byte[]) array.clone());
    }

    public static double[] clone(double[] array) {
        return array == null ? null : (double[]) ((double[]) array.clone());
    }

    public static float[] clone(float[] array) {
        return array == null ? null : (float[]) ((float[]) array.clone());
    }

    public static boolean[] clone(boolean[] array) {
        return array == null ? null : (boolean[]) ((boolean[]) array.clone());
    }

    public static char[] clone(char[] array) {
        return array == null ? null : (char[]) ((char[]) array.clone());
    }
}

Related

  1. clone(int[] array)
  2. clone(int[] in)
  3. clone(int[] src)
  4. clone(int[] src, int[] dest)
  5. clone(Object[] array)
  6. clone(Object[] array)
  7. clone(Object[] source)
  8. clone(Object[] src, Object[] trg)
  9. clone(String[] array)