Java 通过lambda表达式对两个List求交集、并集、差集
List<String> list1 = new ArrayList();List<String> list2 = new ArrayList();// 交集List<String> intersection = list1.stream().filter(item -> list2.contains(item)).collect(toList());// 差集 (list2 - list1)Lis