Skip to content

Instantly share code, notes, and snippets.

@ufo22940268
Created June 8, 2022 11:15
Show Gist options
  • Save ufo22940268/585105b8d4c493e4960b45ef81d48946 to your computer and use it in GitHub Desktop.
Save ufo22940268/585105b8d4c493e4960b45ef81d48946 to your computer and use it in GitHub Desktop.
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
class Scratch {
public static void main(String[] args) {
List<String> newFormIds = Arrays.asList("1", "2", "3", "5");
List<String> results = Arrays.asList("1", "2", "3");
List<String> restFormIds = newFormIds.stream()
.filter(s -> !results.contains(s)).collect(Collectors.toList());
System.out.println("restFormIds = " + restFormIds);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment