Here you can find the source of intArray2String(int[] xs)
public static String intArray2String(int[] xs)
//package com.java2s; //License from project: Apache License public class Main { public static String intArray2String(int[] xs) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < xs.length; ++i) { sb.append(Integer.toString(xs[i])); if (i < xs.length - 1) { sb.append(","); }//from w w w .j av a 2 s . c o m } return sb.toString(); } }