Java Array Concatenate concatArrays(String[] array, String[] arrayToBeConcat)

Here you can find the source of concatArrays(String[] array, String[] arrayToBeConcat)

Description

concat Arrays

License

BSD License

Declaration

public static String[] concatArrays(String[] array,
            String[] arrayToBeConcat) 

Method Source Code

//package com.java2s;
/*L//from   www.jav a2s .  c om
 *  Copyright Washington University in St. Louis
 *  Copyright SemanticBits
 *  Copyright Persistent Systems
 *  Copyright Krishagni
 *
 *  Distributed under the OSI-approved BSD 3-Clause License.
 *  See http://ncip.github.com/catissue-migration-tool/LICENSE.txt for details.
 */

public class Main {
    public static String[] concatArrays(String[] array,
            String[] arrayToBeConcat) {
        String[] concatedArray = new String[array.length
                + arrayToBeConcat.length];
        System.arraycopy(array, 0, concatedArray, 0, array.length);
        System.arraycopy(arrayToBeConcat, 0, concatedArray, array.length,
                arrayToBeConcat.length);
        return concatedArray;
    }
}

Related

  1. concatArrays(final byte[] arr1, final byte[] arr2)
  2. concatArrays(final char[] first, final char[]... rest)
  3. concatArrays(Object[] ar1, Object[] ar2)
  4. concatArrays(short[] arr1, short[] arr2)
  5. concatArrays(String[] A, String[] B)
  6. concatArrays(T[] first, T[] second)
  7. concatArrays(T[] first, T[] second)
  8. concatByteArrays(final byte[] array1, final byte[] array2)
  9. concatenate(@SuppressWarnings("unchecked") T[]... arrays)