Skip to content

Instantly share code, notes, and snippets.

@mcupak
Last active November 9, 2017 02:28
Show Gist options
  • Select an option

  • Save mcupak/c627756fe10904b1f053e707f49a4411 to your computer and use it in GitHub Desktop.

Select an option

Save mcupak/c627756fe10904b1f053e707f49a4411 to your computer and use it in GitHub Desktop.
jshell> numbers.stream().filter(j -> j > 5).collect(Collectors.groupingBy(i -> i % 2, Collectors.counting()))
$2 ==> {1=3}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment