Here you can find the source of concatenate(List
public static String concatenate(List<String> xs)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static String concatenate(List<String> xs) { StringBuilder sb = new StringBuilder(); xs.forEach(ss -> sb.append(ss)); return sb.toString(); }//from ww w . jav a 2s. co m }