Here you can find the source of arrayToString(String[] array)
@SuppressWarnings("unused") private static String arrayToString(String[] array)
//package com.java2s; public class Main { @SuppressWarnings("unused") private static String arrayToString(String[] array) { StringBuilder builder = new StringBuilder((array.length * 2) + 1); int numProcessed = 0; builder.append("["); for (String str : array) { numProcessed++;//from w ww . j a v a2s . c om builder.append(str); if (numProcessed < array.length) builder.append(","); } builder.append("]"); return builder.toString(); } }