Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.HashSet;

import java.util.Set;

public class Main {
    @SafeVarargs
    public static <T> Set<T> set(T... objects) {
        Set<T> set = new HashSet<>();
        for (T t : objects) {
            set.add(t);
        }
        return set;
    }
}