Here you can find the source of merge(List
Parameter | Description |
---|---|
stringList | a parameter |
public static String merge(List<String> stringList)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**/*from w ww. j av a 2s . co m*/ * Merges a string list into a single string without inserting any extra * characters between strings. * * @param stringList * @return merged string */ public static String merge(List<String> stringList) { StringBuilder stringBuilder = new StringBuilder(); for (String string : stringList) { stringBuilder.append(string); } return stringBuilder.toString(); } }