Here you can find the source of intsToCommaSeparatedString(int[] ints)
public static String intsToCommaSeparatedString(int[] ints)
//package com.java2s; //License from project: Apache License public class Main { public static String intsToCommaSeparatedString(int[] ints) { StringBuilder sb = new StringBuilder(ints.length * 5 + ints.length); for (int i = 0; i < ints.length; i++) { sb.append(ints[i]).append(','); }//from ww w.j ava 2 s . c o m return sb.toString(); } }