Here you can find the source of implode(String[] array, String glue)
public static String implode(String[] array, String glue)
//package com.java2s; /**/*ww w. java2 s. c o m*/ * From apache commons, Apache Software License v2 */ public class Main { public static String implode(String[] array, String glue) { String out = ""; if (array.length == 0) { return out; } for (Object part : array) { out = out + part + glue; } out = out.substring(0, out.length() - glue.length()); return out; } }