I have a list of people which I would like to group based on their age (group1 has age < 20, group2 has age >=20) and sort each group based on name and age using Java 8: List of people:
Group 1:
Ane 12
Col 14
Group 2:
James 24
thomas 34
Xavier 55
I would like to use Java 8 to do something like this:
list.stream().collect(Collectors.groupingBy(...