The reason that you still get the list of lists is that when you apply Stream::of, it returns a new stream of the existing one.
That is, when you perform Stream::of, he likes to have {{{1,2}}, {{3,4}}, {{5,6}}}, then when you perform flatMaphe likes to do this:
{{{1,2}}, {{3,4}}, {{5,6}}} -> flatMap -> {{1,2}, {3,4}, {5,6}}
// result after flatMap removes the stream of streams of streams to stream of streams
.flatMap(Collection::stream) , :
{{1,2}, {3,4}, {5,6}}
:
{1,2,3,4,5,6}
:
List<Integer> result = list.stream().flatMap(Collection::stream)
.collect(Collectors.toList());