Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;

import java.util.Collection;

public class Main {
    public static <T> Collection<T> union(Collection<T> set1, Collection<T> set2) {
        Collection<T> union = new ArrayList<T>();
        for (T t : set1) {
            union.add(t);
        }
        for (T t : set2) {
            union.add(t);
        }
        return union;
    }
}