Android examples for java.lang:String Join
Convert Arrays To String using , comma as separator
import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.style.ForegroundColorSpan; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main{ public static String ArraysToString(String[] arrays) { String result = ""; if (arrays != null && arrays.length > 0) { for (String value : arrays) { result += value + ","; }/* w ww . jav a 2 s. co m*/ result = result.substring(0, result.length() - 1); } return result; } }