4
What is the output of the following program?
public class Main {
public static void main(String[] args) {
var words = java.util.List.of("a", "bb", "cc", "ddd");
var g = words.stream().collect(java.util.stream.Collectors.groupingBy(String::length, java.util.stream.Collectors.counting()));
System.out.println(g);
}
}Hard