I have a map Map<K, List<V>> inputMap I want to sort list before storing to list
List<String> outputList = inputMap.keySet()
.stream()
.filter(Objects::nonNull)
.map(key -> (key + "==" + inputMap.get(key).sort(c);))
.sorted()
.collect(Collectors.toList());
cimplemented?ccorrectly. and the code above even can't be compiled due toList.sortnot return anything.{b:[4,3],null:[5,6], a:[2,1]}will output:["a == [1, 2]", "b ==[3, 4]"]