Java tutorial
//package com.java2s; import java.util.ArrayList; import java.util.Collection; public class Main { public static <E> Collection<E> minus(Collection<E> lhs, Collection<E> rhs) { Collection<E> collection = new ArrayList<>(lhs); lhs.removeAll(rhs); return collection; } }