Here you can find the source of array2String(long[] array)
public static String array2String(long[] array)
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { public static String array2String(long[] array) { StringBuilder ret = new StringBuilder("["); if (array != null) { for (int i = 0; i < array.length; i++) ret.append(array[i]).append(" "); }//from w ww . jav a2 s . c o m ret.append(']'); return ret.toString(); } public static String array2String(short[] array) { StringBuilder ret = new StringBuilder("["); if (array != null) { for (int i = 0; i < array.length; i++) ret.append(array[i]).append(" "); } ret.append(']'); return ret.toString(); } public static String array2String(int[] array) { StringBuilder ret = new StringBuilder("["); if (array != null) { for (int i = 0; i < array.length; i++) ret.append(array[i]).append(" "); } ret.append(']'); return ret.toString(); } public static String array2String(boolean[] array) { StringBuilder ret = new StringBuilder("["); if (array != null) { for (int i = 0; i < array.length; i++) ret.append(array[i]).append(" "); } ret.append(']'); return ret.toString(); } public static String array2String(Object[] array) { return Arrays.toString(array); } }