Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.ArrayList;

public class Main {

    public static <T> ArrayList<T> newArrayList() {
        return new ArrayList<T>();
    }

    @SafeVarargs
    public static <T> ArrayList<T> newArrayList(T... values) {
        ArrayList<T> list = new ArrayList<T>(values.length);
        for (T t : values) {
            list.add(t);
        }

        return list;
    }
}