Java tutorial
//package com.java2s; public class Main { public static String arrayStringConvertStr(Iterable<String> ids, String delimiter) { StringBuffer buffer = new StringBuffer(); boolean first = true; for (String id : ids) { if (first) { buffer.append(id); first = false; } else { buffer.append(delimiter).append(id); } } return buffer.toString(); } public static String arrayStringConvertStr(Iterable<String> ids) { return arrayStringConvertStr(ids, ","); } }