Java Array Range Copy copyOf(String[] data, int newLength)

Here you can find the source of copyOf(String[] data, int newLength)

Description

copy Of

License

Open Source License

Declaration

public static String[] copyOf(String[] data, int newLength) 

Method Source Code

//package com.java2s;

public class Main {
    public static String[] copyOf(String[] data, int newLength) {
        String[] tmp = new String[newLength];
        System.arraycopy(data, 0, tmp, 0, Math.min(data.length, newLength));
        return tmp;
    }//  ww  w .j  av  a 2 s.  com
}

Related

  1. copyOf(int[][] pixels)
  2. copyOf(Integer[] original)
  3. copyOf(Object src, int newLength)
  4. copyOf(Object[] array, int newLength)
  5. copyOf(Object[] values, int nlen)
  6. copyOf(String[] original, int newLength)
  7. copyOf(T[] oriArray, int newArraySize, int startOffset)
  8. copyOfArray(int[] a)
  9. copyOfRange(byte[] bytes, int offset, int len)