Here you can find the source of arrayConcatenate(final String[] f, final String[] s)
public static String[] arrayConcatenate(final String[] f, final String[] s)
//package com.java2s; /* Mesquite.zephyr source code. Copyright 2007 and onwards D. Maddison and W. Maddison. Mesquite.zephyr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. Zephry's web site is http://mesquitezephyr.wikispaces.com This source code and its compiled class files are free and modifiable under the terms of GNU Lesser General Public License. (http://www.gnu.org/copyleft/lesser.html) *///from w w w . ja v a 2 s . c o m public class Main { public static String[] arrayConcatenate(final String[] f, final String[] s) { final int fLen = (f == null ? 0 : f.length); final int sLen = (s == null ? 0 : s.length); final int len = fLen + sLen; final String[] ret = new String[len]; if (fLen > 0) { System.arraycopy(f, 0, ret, 0, fLen); if (sLen > 0) { System.arraycopy(s, 0, ret, fLen, sLen); } } else if (sLen > 0) { System.arraycopy(s, 0, ret, 0, sLen); } return ret; } }