Java tutorial
//package com.java2s; import org.json.JSONArray; import org.json.JSONException; public class Main { private static String arrayToString(JSONArray ar) throws JSONException { StringBuffer bfr = new StringBuffer(); for (int i = 0; i < ar.length(); i++) { bfr.append(ar.getString(i)); if (i != ar.length() - 1) bfr.append(","); } return bfr.toString(); } }