SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- employeeList.stream().collect(Collectors.groupingBy(person -> person.age))
- .forEach((age, person) -> {
- System.out.print("In the age " + age + " the following people are present ");
- person.forEach(name -> System.out.print(name.getFirstName() + ", "));
- System.out.println("");
- });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.