Here you can find the source of arrayToString(String[] arrayString, String splitStr)
public static String arrayToString(String[] arrayString, String splitStr)
//package com.java2s; //License from project: Apache License public class Main { public static String arrayToString(String[] arrayString, String splitStr) { StringBuilder sb = new StringBuilder(); if (arrayString == null || arrayString.length == 0) { return null; }/* w ww . j a v a2s.c om*/ for (int i = 0; i < arrayString.length; i++) { if (arrayString[i] != null && arrayString[i].length() > 0) { if (sb.length() > 0) { sb.append(splitStr); } sb.append(arrayString[i]); } } return sb.toString(); } }