Java tutorial
//package com.java2s; //License from project: Open Source License import android.support.annotation.NonNull; public class Main { public static String toString(@NonNull Object[] elements, @NonNull String delimiter) { final StringBuilder builder = new StringBuilder(); boolean nonFirst = false; for (Object o : elements) { if (nonFirst) { builder.append(delimiter); } else { nonFirst = true; } builder.append(o.toString()); } return builder.toString(); } }