Here you can find the source of arrayToString(final Object[] arr)
public static String arrayToString(final Object[] arr)
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { public static String arrayToString(final Object[] arr) { if (arr == null) { return ""; }//w ww .j a v a 2 s.c o m final StringBuilder sb = new StringBuilder(); for (final Object item : arr) { sb.append(item); } return sb.toString(); } public static String toString(final Collection list) { final StringBuilder sb = new StringBuilder(); if (null != list) { for (final Object item : list) { if (null != item) { sb.append(item); } } } return sb.toString(); } public static String toString(final Object[] list) { final StringBuilder sb = new StringBuilder(); if (null != list) { for (final Object item : list) { if (null != item) { sb.append(item); } } } return sb.toString(); } }