Here you can find the source of mergeToArray(T... args)
public static <T> ArrayList<T> mergeToArray(T... args)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Arrays; public class Main { public static <T> ArrayList<T> mergeToArray(T... args) { ArrayList<T> out = new ArrayList<T>(); out.addAll(Arrays.asList(args)); return out; }//from ww w .j av a 2 s. c o m }