Here you can find the source of arrayToString(String[] str, char sep)
public static String arrayToString(String[] str, char sep)
//package com.java2s; // in accordance with the terms of the license agreement accompanying it. public class Main { /**//from ww w . j a va 2 s. c o m * Convert a string array to a string separated by some char. **/ public static String arrayToString(String[] str, char sep) { if (str == null) return null; StringBuffer sb = new StringBuffer(); for (int i = 0; i < str.length; i++) { sb.append(str[i]); sb.append(sep); } return sb.toString(); } }