Here you can find the source of intArrayToString(String tag, int[] arr)
public static String intArrayToString(String tag, int[] arr)
//package com.java2s; //License from project: Open Source License public class Main { public static String intArrayToString(String tag, int[] arr) { StringBuilder builder = new StringBuilder("\""); builder.append(tag + "\"" + ":["); for (int i = 0, len = arr.length; i < len - 1; i++) builder.append(arr[i] + ","); builder.append(arr[arr.length - 1] + "]"); return builder.toString(); }//from w ww . j a v a 2 s. co m }