Here you can find the source of join(char sep, Object[] array)
public static String join(char sep, Object[] array)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static String join(char sep, Object[] array) { return join(sep, Arrays.asList(array)); }//from ww w .ja va 2 s. com public static String join(char sep, Iterable it) { String s = ""; for (Object o : it) s += (s.length() == 0 ? "" : sep) + o.toString(); return s; } public static <T> T[] join(T[] a, T[] b) { T[] res = Arrays.copyOf(a, a.length + b.length); System.arraycopy(b, 0, res, a.length, b.length); return res; } public static float[] join(float[] a, float[] b) { float[] res = Arrays.copyOf(a, a.length + b.length); System.arraycopy(b, 0, res, a.length, b.length); return res; } public static double[] join(double[] a, double[] b) { double[] res = Arrays.copyOf(a, a.length + b.length); System.arraycopy(b, 0, res, a.length, b.length); return res; } public static String[] toString(long[] dom) { String[] result = new String[dom.length]; for (int i = 0; i < dom.length; i++) result[i] = String.valueOf(dom[i]); return result; } public static String[] toString(int[] dom) { String[] result = new String[dom.length]; for (int i = 0; i < dom.length; i++) result[i] = String.valueOf(dom[i]); return result; } }