Java Integer Array Create intArrayConcat(int[] a, int[] b)

Here you can find the source of intArrayConcat(int[] a, int[] b)

Description

Return a new int[] which is the concatenation of a and b

License

Open Source License

Parameter

Parameter Description
a a parameter
b a parameter

Declaration

public static int[] intArrayConcat(int[] a, int[] b) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**//from www  .jav  a 2  s  .  c o m
     * Return a new int[] which is the concatenation of a and b 
     * 
     * @param a
     * @param b
     * @return
     */
    public static int[] intArrayConcat(int[] a, int[] b) {
        int[] retval = new int[a.length + b.length];
        System.arraycopy(a, 0, retval, 0, a.length);
        System.arraycopy(b, 0, retval, a.length, b.length);
        return retval;
    }
}

Related

  1. intArray(double a, double b, double c)
  2. intArray(int len)
  3. intArray(Integer... values)
  4. intArray(String data)
  5. intArrayContains(int val, int[] array)
  6. intArrayContains(int[] array, int key)
  7. intArrayEquals(int[] a1, int[] a2)
  8. intArrayFromString(final String data)