Here you can find the source of explode(String[] elements, String separator)
private static String explode(String[] elements, String separator)
//package com.java2s; /**/*from w ww . j av a 2s .co m*/ * Copyright (C) 2008 Progress Software, Inc. All rights reserved. * http://fusesource.com * * The software in this package is published under the terms of the AGPL license * a copy of which has been included with this distribution in the license.txt file. */ public class Main { private static String explode(String[] elements, String separator) { StringBuffer result = new StringBuffer(); for (int i = 0; i < elements.length; i++) { result.append(elements[i]); if (i + 1 < elements.length) { result.append(separator); } } return result.toString(); } }