Here you can find the source of arrayToString(String[] object)
public static String arrayToString(String[] object)
//package com.java2s; import java.util.Arrays; public class Main { public static String arrayToString(String[] object) { String s = Arrays.toString(object); s = s.replaceAll("\\[|\\]", ""); return s; }//from w ww . j a v a 2 s. c o m public static String toString(String str) { if (str == null) return ""; else return str; } public static String toString(Object str) { if (str == null) return ""; else return str.toString(); } }