Here you can find the source of arrayToString(int[] c, String separator)
public static String arrayToString(int[] c, String separator)
//package com.java2s; //License from project: Open Source License public class Main { public static String arrayToString(int[] c, String separator) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < c.length; i++) { if (i > 0) { sb.append(separator);/*from w w w .j a va 2 s.c o m*/ } sb.append(c[i]); } return sb.toString(); } public static String arrayToString(double[] c, String separator) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < c.length; i++) { if (i > 0) { sb.append(separator); } sb.append(c[i]); } return sb.toString(); } }