Java Array to String array2displaystr(Object[] datas)

Here you can find the source of array2displaystr(Object[] datas)

Description

arraydisplaystr

License

Apache License

Declaration

public static final String array2displaystr(Object[] datas) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static final String array2displaystr(Object[] datas) {
        if (datas == null || datas.length == 0) {
            return "[]";
        }/*ww w .  j a  v a  2  s  .c  om*/
        StringBuffer r = new StringBuffer();
        r.append("[");
        for (int i = 0; i < datas.length && i < 11; i++) {
            r.append(datas[i]).append(',');
        }
        r.setCharAt(r.length() - 1, ']');
        return r.toString();
    }
}

Related

  1. array2String(double[] array)
  2. array2String(E[] array)
  3. array2string(final T[] array, final int top)
  4. array2string(int[] _a)