Java tutorial
//package com.java2s; import java.util.*; public class Main { public static <T1> void difference(List<T1> lst1, List<T1> lst2) { for (T1 elem : lst2) { lst1.remove(elem); } } }