Android examples for java.lang:String Join
convert Array To String With Comma
public class Main{ public static String convertArrayToStringWithComma(final Object[] array) { if (array == null) { return null; } else {//from w w w . ja va 2 s .c o m StringBuilder sb = new StringBuilder(); boolean first = true; for (int i = 0; i < array.length; i++) { if (!first) { sb.append(','); } sb.append(array[i].toString()); first = false; } return sb.toString(); } } }