Here you can find the source of concat(Stream
@SafeVarargs public static <T> Stream<T> concat(Stream<T>... streams)
//package com.java2s; //License from project: Open Source License import java.util.stream.Stream; public class Main { /**/*from w w w .java2 s . c o m*/ * Concats any number of Streams not just 2 as in {@link Stream#concat(Stream, Stream)}. * @since 2016.04 */ @SafeVarargs public static <T> Stream<T> concat(Stream<T>... streams) { return Stream.of(streams).reduce(Stream::concat).orElse(Stream.empty()); } }