Here you can find the source of toArray(T... items)
public static <T> T[] toArray(T... items)
//package com.java2s; //License from project: Apache License public class Main { public static <T> T[] toArray(T... items) { return items; }//from w ww . j av a 2 s . c om }