Answers for "java flatten list"

1

java flatten list

List<List<Object>> list = ...
List<Object> flat = 
    list.stream()
        .flatMap(List::stream)
        .collect(Collectors.toList());
Posted by: Guest on March-01-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language