Java Array Join join(T[] a, T[] b)

Here you can find the source of join(T[] a, T[] b)

Description

join two arrays together

License

Open Source License

Declaration

public static <T> T[] join(T[] a, T[] b) 

Method Source Code


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

import java.util.*;

public class Main {
    /**/*from w ww  .  j  a v  a 2  s .c o m*/
     * join two arrays together
     */
    public static <T> T[] join(T[] a, T[] b) {
        T[] x = Arrays.copyOf(a, a.length + b.length);
        for (int n = 0; n < b.length; n++) {
            x[a.length + n] = b[n];
        }
        return x;
    }
}

Related

  1. join(String[] tokens, String delimiter)
  2. join(String[] tokens, String separator)
  3. join(String[] x)
  4. join(String[]... arrays)
  5. join(String[]... values)
  6. join(T[] arr1, T[] arr2)
  7. join(T[] array, String join)
  8. join(T[] array, String separator)
  9. join(T[] array, String separator)