Wraps generic elements into an array. - Java java.lang

Java examples for java.lang:int Array

Description

Wraps generic elements into an array.

Demo Code

// Copyright (c) 2003-present, Jodd Team (jodd.org). All Rights Reserved.
import java.lang.reflect.Array;
import static jodd.util.StringPool.NULL;

public class Main{
    /**//from  w ww  .  j a  va2s.c o m
     * Wraps elements into an array.
     */
    public static <T> T[] array(T... elements) {
        return elements;
    }
}

Related Tutorials