Java Array Copy arrayCopy(char[] chars)

Here you can find the source of arrayCopy(char[] chars)

Description

array Copy

License

Apache License

Declaration

public static char[] arrayCopy(char[] chars) 

Method Source Code

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

public class Main {
    public static char[] arrayCopy(char[] chars) {
        if (chars == null)
            return null;
        char[] copy = new char[chars.length];
        System.arraycopy(chars, 0, copy, 0, chars.length);
        return copy;
    }//from w ww  . j  a v a 2  s .  c o m
}

Related

  1. arraycopy(byte[] src, int destLen, int len)
  2. arraycopy(byte[] src, int src_position, byte[] dst, int dst_position, int length)
  3. arrayCopy(byte[] src, int srcOffset, byte[] target, int targetOffset, int length)
  4. arrayCopy(byte[] src, int srcStart, byte[] dest, int destStart, int destBitOffset, int lengthInBits)
  5. arraycopy(char[] A1, int offset1, char[] A2, int offset2, int length)
  6. arrayCopy(double[][] src)
  7. arrayCopy(final byte[] src, final byte[] dest)
  8. arrayCopy(final float[] arrayToCopy)
  9. arrayCopy(int[] array, int i0, int n, boolean isReverse)