Here you can find the source of intArraytoString(int[] a)
public static String intArraytoString(int[] a)
//package com.java2s; public class Main { public static String intArraytoString(int[] a) { if (a == null) return ""; int iMax = a.length - 1; if (iMax == -1) return ""; StringBuilder b = new StringBuilder(); for (int i = 0;; i++) { b.append(a[i]);//from w w w.j a va2 s . c o m if (i == iMax) return b.toString(); b.append(","); } } }