Here you can find the source of concatArray(int[] src, String separator)
public static String concatArray(int[] src, String separator)
//package com.java2s; public class Main { public static String concatArray(int[] src, String separator) { if (src.length == 0) { return null; }/*from w w w . j a v a2 s . co m*/ if (src.length <= 1) { return String.valueOf(src[0]); } StringBuilder builder = new StringBuilder(); builder.append(src[0]); for (int i = 1; i < src.length; i++) { builder.append(separator).append(src[i]); } return builder.toString(); } }