Here you can find the source of ArrayToString(String[] values)
public static String ArrayToString(String[] values)
//package com.java2s; //License from project: Open Source License public class Main { public static String ArrayToString(String[] values) { return ArrayToString(values, ','); }/*from www . j a va 2s .c o m*/ public static String ArrayToString(String[] values, char delimiter) { String result = ""; int offset = 0; for (String value : values) { if (value.indexOf(delimiter) >= 0) { result += "\"" + value + "\""; } else result += value; offset++; if (offset < values.length) { result += delimiter; } } return result; } }