Files
2022-12-23 13:26:29 +00:00

9 lines
300 B
Java

// "Collapse loop with stream 'toArray()'" "true-preview"
import java.util.*;
public class Main {
public Integer[] testNestedAnyMatch(List<List<String>> data) {
return data.stream().filter(list -> list.stream().anyMatch(str -> !str.isEmpty())).map(List::size).toArray(Integer[]::new);
}
}