Here you can find the source of array(T... values)
@SuppressWarnings("unchecked") public static <T> T[] array(T... values)
//package com.java2s; public class Main { /**//from w w w . jav a 2 s . c o m * Terse (especially as a static import) way to create a T[] literal. */ @SuppressWarnings("unchecked") public static <T> T[] array(T... values) { return values; } }