Java tutorial
//package com.java2s; import android.support.annotation.NonNull; import java.util.List; public class Main { public static String joinStrings(List<String> strings, String delimiter, @NonNull StringBuilder builder) { builder.setLength(0); if (strings != null) for (String str : strings) { if (builder.length() > 0) builder.append(delimiter); builder.append(str); } return builder.toString(); } }