Here you can find the source of array(T... elems)
@SafeVarargs public static <T> T[] array(T... elems)
//package com.java2s; /******************************************************************************* * Copyright (c) 2007 Bruno Medeiros and other Contributors. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*www. j a v a2s . c om*/ * Bruno Medeiros - initial implementation *******************************************************************************/ public class Main { /** Shortcut for creating an array of T. */ @SafeVarargs public static <T> T[] array(T... elems) { return elems; } }