Java Array Concatenate concatArrays(Object[] ar1, Object[] ar2)

Here you can find the source of concatArrays(Object[] ar1, Object[] ar2)

Description

concat Arrays

License

LGPL

Declaration

public static Object[] concatArrays(Object[] ar1, Object[] ar2) 

Method Source Code


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

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static Object[] concatArrays(Object[] ar1, Object[] ar2) {
        List<Object> thelist = new ArrayList<Object>();
        for (Object o : ar1)
            thelist.add(o);//from   w w  w  . j  a  v  a 2 s  .  c  o  m
        for (Object o : ar2)
            thelist.add(o);
        return thelist.toArray();
    }
}

Related

  1. concatArrays(byte[]... byaArrays)
  2. concatArrays(byte[][] arrays)
  3. concatArrays(double[] d1, double[] d2)
  4. concatArrays(final byte[] arr1, final byte[] arr2)
  5. concatArrays(final char[] first, final char[]... rest)
  6. concatArrays(short[] arr1, short[] arr2)
  7. concatArrays(String[] A, String[] B)
  8. concatArrays(String[] array, String[] arrayToBeConcat)
  9. concatArrays(T[] first, T[] second)