Here you can find the source of merge(String[]... arrays)
public static String[] merge(String[]... arrays)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; public class Main { public static String[] merge(String[]... arrays) { if (arrays == null) { throw new IllegalArgumentException("argument must not be null."); }//w w w . ja va 2 s . c o m List<String> result = new ArrayList<String>(); for (String[] array : arrays) { Collections.addAll(result, array); } return toArray(result); } public static String[] toArray(Collection<String> collection) { if (collection == null) { throw new IllegalArgumentException("argument must not be null."); } return collection.toArray(new String[collection.size()]); } }