Java Array Clone clone(int[] a)

Here you can find the source of clone(int[] a)

Description

clone

License

Apache License

Declaration

public static final int[] clone(int[] a) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static final int[] clone(int[] a) {
        if (a == null || a.length < 1) {
            return a;
        }/*  w ww  . j  a  v a  2s. com*/
        int[] r = new int[a.length];
        System.arraycopy(a, 0, r, 0, r.length);
        return r;
    }
}

Related

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