Here you can find the source of array(T... elements)
Parameter | Description |
---|---|
elements | The elements for which to create an array. |
T | The type of the elements (and array) |
public static <T> T[] array(T... elements)
//package com.java2s; //License from project: Apache License public class Main { /**//w w w.j ava 2s . com * Shortcurt to create an array of elements. * * @param elements The elements for which to create an array. * @param <T> The type of the elements (and array) * @return An array of the given elements. */ public static <T> T[] array(T... elements) { return elements; } }