I have two arrayLists and I am trying to \"subtract\" one arrayList from another. For example, if I have one arrayList [1,2,3] and I am trying to subtract [0, 2, 4] the resu
Try to use subtract method of org.apache.commons.collections.CollectionUtils class.
Returns a new Collection containing a - b. The cardinality of each element e in the returned Collection will be the cardinality of e in a minus the cardinality of e in b, or zero, whichever is greater.
CollectionUtils.subtract(java.util.Collection a, java.util.Collection b)
From Apache Commons Collections