I have a lambda expression where I want to create a list of object but I am getting the error
List<ClassObject> classObject = obj1.getFileId().stream()
                .map(x -> obj1.getCustomObj().stream()
                        .map(y -> obj1.builder().Id(x).name(y.getName()).value(y.getValue())
                                .details(obj1.getDetails()).build()))
                .collect(Collectors.toList());
Error
Type mismatch: cannot convert from List<Stream<ClassObject>> to List<ClassObject>
I want List<ClassObject> as return type from the lambda expression. How can I achieve that?
 
    