Here you can find the source of arrayToString(Object[] arr)
public static String arrayToString(Object[] arr)
//package com.java2s; /*//w ww . j a va2 s . c om Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved See License.txt in the project root for license information. */ public class Main { public static String arrayToString(Object[] arr) { if (arr == null) { return "<<NULL>>"; } else { StringBuilder sb = new StringBuilder(); sb.append("["); for (int i = 0; i < arr.length; i++) { Object elem = arr[i]; sb.append(elem.toString()); if (i != arr.length - 1) { sb.append(", "); } } sb.append("]"); return sb.toString(); } } }