Question is simple:
I have two List
List columnsOld = DBUtils.GetColumns(db, TableName);
List columnsNew = DBUtils.GetCol
Using Google's Guava library:
Sets.intersection(Sets.newHashSet(setA), Sets.newHashSet(setB))
Note: This is much more efficient than naively doing the intersection with two lists: it's O(n+m), versus O(n×m) for the list version. With two million-item lists it's the difference between millions of operations and trillions of operations.