Java Array Concatenate arrayConcatInt(final int[] original, final int[] appender)

Here you can find the source of arrayConcatInt(final int[] original, final int[] appender)

Description

Concatenates two integer arrays

License

Apache License

Parameter

Parameter Description
original the original
appender the array to append

Return

the concatenated array

Declaration

public static int[] arrayConcatInt(final int[] original,
        final int[] appender) 

Method Source Code

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

import java.util.Arrays;

public class Main {
    /**//from   w  ww.  ja v a 2s .  c  om
     * Concatenates two integer arrays
     * 
     * @param original the original
     * @param appender the array to append
     * @return the concatenated array
     */
    public static int[] arrayConcatInt(final int[] original,
            final int[] appender) {
        final int[] result = Arrays.copyOf(original, original.length
                + appender.length);
        System.arraycopy(appender, 0, result, original.length,
                appender.length);
        return result;
    }
}

Related

  1. arrayConcat(T[] a, T[] b)
  2. arrayConcat(T[] first, T[] second)
  3. arrayConcat(T[] first, T[] second)
  4. arrayConcatenate(final String[] f, final String[] s)
  5. arrayConcatenate(String[] first, String[] second)
  6. concat(boolean[] a, boolean[] b)
  7. concat(boolean[]... arys)
  8. concat(byte[] a, byte[]... b)
  9. concat(byte[] first, byte[] second)