// 假设A和B是两个对象数组
List<Stu> A = new ArrayList<>();
List<Stu> B = new ArrayList<>();
// 使用 Stream API 进行筛选
List<Stu> collect = A.stream()
.filter(a -> !B.stream()
.anyMatch(b -> a.id().equals(b.id())))
.collect(Collectors.toList());
collect.forEach(choose -> {
...
})