Created
May 14, 2020 09:39
-
-
Save trishagee/3d4f5af1b7e1152a634e150405af0322 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List.of(manager1, manager2).stream() | |
| .flatMap(m -> | |
| Stream.concat(m.getEmployeeList().stream(), Stream.of(m))) | |
| .distinct() | |
| .mapToInt(Employee::getYearlySalary) | |
| .sum(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment