Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    @SafeVarargs
    public static <T> Set<T> set(T... elements) {
        return new HashSet<T>(list(elements));
    }

    /**
    Answer a list of all the arguments, in order.
     */
    @SafeVarargs
    public static <T> List<T> list(T... elements) {
        return Arrays.asList(elements);
    }
}