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

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

Description

join

License

Apache License

Declaration

public static long[] join(long[] a, long[] b) 

Method Source Code

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

import java.util.Arrays;

public class Main {
    public static long[] join(long[] a, long[] b) {
        long[] res = Arrays.copyOf(a, a.length + b.length);
        System.arraycopy(b, 0, res, a.length, b.length);
        return res;
    }/*from  w  w w .java  2  s .c o  m*/

    public static float[] join(float[] a, float[] b) {
        float[] res = Arrays.copyOf(a, a.length + b.length);
        System.arraycopy(b, 0, res, a.length, b.length);
        return res;
    }

    public static <T> T[] join(T[] a, T[] b) {
        T[] res = Arrays.copyOf(a, a.length + b.length);
        System.arraycopy(b, 0, res, a.length, b.length);
        return res;
    }
}

Related

  1. join(final String[] values, final String delimiter)
  2. join(final T[] array, final char c)
  3. join(final T[] collection)
  4. join(int[] array, String separator)
  5. join(int[] follows)
  6. join(long[] array, String delim)
  7. join(Object[] arguments)
  8. join(Object[] arr)
  9. join(Object[] arr, String separator)