Here you can find the source of stringArrayToString(String[] array)
public static String stringArrayToString(String[] array)
//package com.java2s; public class Main { public static String stringArrayToString(String[] array) { return arrayToString(array); }/*from ww w . j ava 2 s. c o m*/ public static String arrayToString(String[] array) { if (array == null || array.length == 0) { return ""; } StringBuilder builder = new StringBuilder(); for (String s : array) { builder.append(s).append("; "); } builder.delete(builder.length() - 2, builder.length()); return builder.toString(); } public static String arrayToString(Object[] array) { if (array == null || array.length == 0) return "[]"; StringBuffer strings = new StringBuffer(); strings.append("["); for (Object x : array) { strings.append(x.toString()).append("; "); } strings.delete(strings.length() - 2, strings.length()); strings.append("]"); return strings.toString(); } }