Java Array Create array(T... values)

Here you can find the source of array(T... values)

Description

Terse (especially as a static import) way to create a T[] literal.

License

Open Source License

Declaration

@SuppressWarnings("unchecked")
public static <T> T[] array(T... values) 

Method Source Code

//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;
    }
}

Related

  1. array(String... strings)
  2. array(T... ar)
  3. array(T... elements)
  4. array(T... elems)
  5. array(T... ts)
  6. array(T... values)
  7. arrayConstructor(int len)
  8. arrayOf(int... values)
  9. arrayOf(long... values)