Here you can find the source of arrayToLongString(T[] array)
public static <T> String arrayToLongString(T[] array)
//package com.java2s; //License from project: Open Source License public class Main { public static <T> String arrayToLongString(T[] array) { StringBuilder sb = new StringBuilder(); sb.append("["); for (int i = 0; i < array.length; i++) { sb.append(array[i].toString()); if (i != array.length - 1) sb.append(", "); }//from w w w . j a va 2 s .c o m sb.append("]"); return sb.toString(); } public static String arrayToLongString(int[] array) { StringBuilder sb = new StringBuilder(); sb.append("["); for (int i = 0; i < array.length; i++) { sb.append(array[i]); if (i != array.length - 1) sb.append(", "); } sb.append("]"); return sb.toString(); } }