Back to project page Locast-Core-Android.
The source code is released under:
GNU General Public License
If you think the Android project Locast-Core-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.stackoverflow; /*from www . j a v a 2 s.com*/ /** * License: http://creativecommons.org/licenses/by-sa/2.5/ * * @see http://stackoverflow.com/questions/80476/how-to-concatenate-two-arrays-in-java */ public class ArrayUtils { public static <T> T[] concat(T[] a, T[] b) { final int alen = a.length; final int blen = b.length; @SuppressWarnings("unchecked") final T[] result = (T[]) java.lang.reflect.Array. newInstance(a.getClass().getComponentType(), alen + blen); System.arraycopy(a, 0, result, 0, alen); System.arraycopy(b, 0, result, alen, blen); return result; } }