Here you can find the source of ArrayToCSV(String[] array)
public static String ArrayToCSV(String[] array)
//package com.java2s; //License from project: Open Source License public class Main { public static String ArrayToCSV(String[] array) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < array.length; i++) { String string = array[i]; if (i == 0) sb.append(string);//from w w w . j av a2 s . c o m else sb.append("," + string); } return sb.toString(); } }