Here you can find the source of mergeString(List
public static String mergeString(List<String> strs)
//package com.java2s; import java.util.List; public class Main { public static String mergeString(String... ss) { StringBuffer sBuffer = new StringBuffer(); for (String s : ss) { sBuffer.append(s);//from ww w . jav a 2s. c o m } return sBuffer.toString(); } public static String mergeString(List<String> strs) { StringBuffer sBuffer = new StringBuffer(); for (String s : strs) { sBuffer.append(s); } return sBuffer.toString(); } public static String mergeString(Object... objs) { StringBuffer sBuffer = new StringBuffer(); for (Object o : objs) { sBuffer.append(o); } return sBuffer.toString(); } }