Here you can find the source of joinList(String seperator, List extends Object> list, String def)
public static String joinList(String seperator, List<? extends Object> list, String def)
//package com.java2s; import java.util.List; public class Main { public static String joinList(String seperator, List<? extends Object> list) { return joinList(seperator, list, ""); }// ww w.j a v a 2 s .c o m 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(); } }