Minus operation in java 8 for subtracting Lists
If you must use Streams:
List<Integer> diff = list1.stream()
.filter(item -> !list2.contains(item))
.collect(Collectors.toList());
Using Apache commons:
CollectionUtils.subtract(list1, list2);
Pros: Very readable. Cons: No type safety
Try this:
List<Integer> difference = new ArrayList<>(list1);
difference.removeAll(list2);
System.out.println("Remove: " + difference); //3