Here you can find the source of combine(Object[] objects, String glue)
public static String combine(Object[] objects, String glue)
//package com.java2s; //License from project: Open Source License public class Main { public static String combine(Object[] objects, String glue) { int l = objects.length; int m = l - 1; int x;//from w w w . j ava 2 s. c o m if (l == 0) { return null; } StringBuilder r = new StringBuilder(); for (x = 0; x < m; x++) { r.append(objects[x]).append(glue); } r.append(objects[x]); return r.toString(); } }