List compiles for me, and D is what I would expect, but the answer says E works as well, but Set doesn't compile for me... what am I missing?
Doesn't compile...
Map<Boolean, Set<
String>> ml =
Stream.of("I", "Love", "CodeRanch")
.collect(Collectors.partitioningBy(so -> so.length() > 3));
This compiles fine...
Map<Boolean, List<String>> ml =
Stream.of("I", "Love", "CodeRanch")
.collect(Collectors.partitioningBy(so -> so.length() > 3));
Thanks!