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.List;

public class Main {
    public static <U> List<U> getDifference(Iterable<U> X, Iterable<U> A) {
        List<U> list = new ArrayList<U>();

        for (U x : X) {
            list.add(x);
        }

        for (U a : A) {
            list.remove(a);
        }

        return list;
    }
}