The problem is s → s [0], where s is inferred as the generic type T instead of String [].
Actually, this is not a problem. scorrectly displayed as String[]. Nonetheless,
a.stream().collect(Collectors.groupingBy(s -> s[0]));
creates a Map<String,List<String[]>>, not a Map<String,List<String>>. This is problem.
String String String, .
:
Map<String,List<String>> b =
a.stream()
.collect(Collectors.groupingBy(s -> s[0],
Collectors.mapping (s -> String.join (".", s),
Collectors.toList ())));
:
{a=[a.b], c=[c.b]}