Java tutorial
//package com.java2s; import java.util.List; public class Main { public static String makeCommaSepratedString(List<String> list, String delim) { StringBuilder sb = new StringBuilder(); String loopDelim = ""; for (String s : list) { sb.append(loopDelim); sb.append(s); loopDelim = delim; } return sb.toString(); } }