Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var employees = Arrays.asList(new Employee(1, "Ashish", 28, 10000)
, new Employee(2, "Ajay", 29, 1000)
, new Employee(3, "Abhishek", 29, 10000));
var employeeMap =
.collect(Collectors.toMap(Employee::getId, Employee::getName));
var groupedMap =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment