Here you can find the source of concatArray(JSONArray arr1, JSONArray arr2)
public static JSONArray concatArray(JSONArray arr1, JSONArray arr2) throws JSONException
//package com.java2s; import org.json.JSONArray; import org.json.JSONException; public class Main { public static JSONArray concatArray(JSONArray arr1, JSONArray arr2) throws JSONException { JSONArray result = new JSONArray(); for (int i = 0; i < arr1.length(); i++) { result.put(arr1.get(i));//from w ww.j ava2 s . com } for (int i = 0; i < arr2.length(); i++) { result.put(arr2.get(i)); } return result; } }