Here you can find the source of longArrayAsString(long[] a)
public static String longArrayAsString(long[] a)
//package com.java2s; /*/* w w w. java2 s. c o m*/ * (C) Copyright IBM Corp. 2008 * * LICENSE: Eclipse Public License v1.0 * http://www.eclipse.org/legal/epl-v10.html */ public class Main { public static String longArrayAsString(long[] a) { if (null == a) return null; int len = a.length; StringBuffer pcs = new StringBuffer(0 < len ? "[" + a[0] : "["); for (int i = 1; i < len; i++) pcs.append(", " + a[i]); pcs.append(']'); return pcs.toString(); } }