Here you can find the source of joinList(String seperator, List extends Object> list)
public static String joinList(String seperator, List<? extends Object> list)
//package com.java2s; import java.util.List; public class Main { public static String joinList(String seperator, List<? extends Object> list) { return joinList(seperator, list, ""); }/*w ww .ja va 2s. c om*/ public static String joinList(String seperator, List<? extends Object> list, String def) { if (list.isEmpty()) return def; StringBuilder b = new StringBuilder(); boolean first = true; for (Object s : list) { if (!first) b.append(seperator); b.append(s.toString()); first = false; } return b.toString(); } }