Android examples for java.lang:String Join
convert list To String and use comma as separator
import java.util.List; public class Main{ public static String listToString(List<String> list) { if (list == null) return null; StringBuilder result = new StringBuilder(); boolean flag = false; while (list.iterator().hasNext()) { String string = list.iterator().next(); if (!flag) { result.append(","); } else { flag = true;//from w ww .j a va 2 s . c o m } result.append(string); } return result.toString(); } }