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[]) { if (null == values) return ""; StringBuffer buffer = new StringBuffer(values.length); for (int i = 0; i < values.length; i++) buffer.append(values[i]).append(","); if (buffer.length() > 0) return buffer.toString().substring(0, buffer.length() - 1); else//from w w w. j ava 2 s . c om return ""; } }