15
What is the output of the following program?
import java.util.*;
import java.util.stream.*;
public class Main {
public static void main(String[] args) {
Map<Integer, Long> byLen = Stream.of("to", "be", "or", "not").collect(java.util.stream.Collectors.groupingBy(String::length, TreeMap::new, java.util.stream.Collectors.counting()));
System.out.println(byLen);
}
}Hard