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;

import java.util.List;

public class Main {
    public static <T> List<T> toList(T atLeastOneT, T... otherTs) {
        ArrayList<T> allTs = new ArrayList<T>(Arrays.asList(otherTs));
        allTs.add(atLeastOneT);

        return allTs;
    }
}