Here you can find the source of arrayToString(final Object[] array)
Parameter | Description |
---|---|
array | an array to print |
public static String arrayToString(final Object[] array)
//package com.java2s; public class Main { /**//from ww w. j av a 2 s . c om * @param array an array to print * @return a prettier string representation of the array */ public static String arrayToString(final Object[] array) { String result = "["; for (int i = 0; i < array.length; ++i) { result += array[i].toString(); if (i < array.length - 1) { result += ", "; } } result += "]"; return result; } }