Here you can find the source of join(Stream
public final static <T> String join(Stream<T> stream)
//package com.java2s; //License from project: Apache License import java.util.stream.Collectors; import java.util.stream.Stream; public class Main { public final static <T> String join(Stream<T> stream) { return stream.map(t -> t.toString()).collect(Collectors.joining()); }/*from ww w. jav a 2 s.c o m*/ public final static <T> String join(Stream<T> stream, String sep) { return stream.map(t -> t.toString()).collect(Collectors.joining(sep)); } public final static <T> String join(Stream<T> stream, String sep, String start, String end) { return stream.map(t -> t.toString()).collect(Collectors.joining(sep, start, end)); } }