Here you can find the source of array2String(String[] array)
public static String array2String(String[] array)
//package com.java2s; //License from project: Open Source License public class Main { public static String array2String(String[] array) { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < array.length; i++) { buffer.append(",").append(array[i]); }/* w ww . j ava 2 s. com*/ return buffer.toString().replaceFirst(",", ""); } }