the example code I've been given is
public Map<String, List<Bier>> opzettenOverzichtBierenPerSoort() {
//TODO
return bieren.stream().collect(Collectors.groupingBy(Bier::getSoort, TreeMap::new, Collectors.toList()));
}
input is a list of beer objects and it return a map of the kind of beer with all the beers in it.
now my question. wat are the second and third arguments in the groupingBy? I get the first one which states what it's grouped by...but the second and third seem a bit random.