Java tutorial
//package com.java2s; import java.util.ArrayList; public class Main { /** * Implode * @param ids * @return */ public static String convertToCommaDelimitedString(ArrayList<String> ids) { String out = ""; for (int i = 0; i < ids.size(); i++) { if (i != 0) { out += "','"; } out += ids.get(i).toString(); } return "'" + out + "'"; } }