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.Collections;
import java.util.HashSet;
import java.util.Set;

public class Main {

    public static <E> Set<E> difference(final Set<E> set1, final Set<E> set2) {
        Set<E> set = new HashSet<>(set1);
        set.removeAll(set2);
        return Collections.unmodifiableSet(set);
    }
}