public static Object arrayToString(final Object obj) {
        if (obj != null && obj.getClass().isArray()) {
            final int len = Array.getLength(obj);
            final String[] strings = new String[len];
            for (int i = 0; i < len; i++) {
                strings[i] = String.valueOf(Array.get(obj, i));
            }
            return Arrays.toString(strings);
        } else {
            return obj;
        }
    }
public static Object arrayToString ( final Object obj ) { if ( obj != null && obj . getClass ( ) . isArray ( ) ) { final int len = Array . getLength ( obj ) ; final String [ ] strings = new String [ len ] ; for ( int i = 0 ; i < len ; i ++ ) { strings [ i ] = String . valueOf ( Array . get ( obj , i ) ) ; } return Arrays . toString ( strings ) ; } else { return obj ; } }
{@link Arrays#toString(Object[])} with {@link Arrays#toString(Object[])} for array elements.