Java tutorial
//package com.java2s; public class Main { public static String toString(Object array[]) { StringBuffer sb = new StringBuffer(); 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(); } }