Here you can find the source of concat(String[] first, Collection
public static String[] concat(String[] first, Collection<String> second)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.Collection; import java.util.Iterator; public class Main { public static String[] concat(String[] first, Collection<String> second) { String[] array = Arrays.copyOf(first, first.length + second.size()); Iterator<String> it = second.iterator(); for (int i = first.length; i < array.length; i++) array[i] = it.next();//from w ww. j a va2 s.c o m return array; } }