Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ArrayList;
import java.util.Arrays;

public class Main {
    /**
     * create list from array
     *
     * @param <T>
     * @param values
     * @return array values in list
     */
    public static <T> ArrayList<T> fromArray(T... values) {
        ArrayList<T> list = new ArrayList<T>();
        list.addAll(Arrays.asList(values));
        return list;
    }
}