Here you can find the source of copyArray(String[] originalArray)
Parameter | Description |
---|---|
originalArray | a parameter |
public static String[] copyArray(String[] originalArray)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w ww . j a va2 s . c o m*/ * Copy a string array. * * @param originalArray * @return new string array */ public static String[] copyArray(String[] originalArray) { String[] copyOf = new String[originalArray.length]; System.arraycopy(originalArray, 0, copyOf, 0, originalArray.length); return copyOf; } }