Given a list of strings:
List<String> strings = Arrays.asList("a", "abc", "aa", "ccbb");
What elements does the resulting lengths list contain?
??? lengths = strings.stream()
.map(String::length)
.collect(Collectors.toList());Given a list of strings:
List<String> strings = Arrays.asList("a", "abc", "aa", "ccbb");
What elements does the resulting lengths list contain?
??? lengths = strings.stream()
.map(String::length)
.collect(Collectors.toList());Create a free account to access the full topic