Java Array to String array2String(E[] array)

Here you can find the source of array2String(E[] array)

Description

array String

License

Open Source License

Declaration

public static <E> String array2String(E[] array) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static <E> String array2String(E[] array) {
        return array2String(array, 0, array.length);
    }/* www.j  av a  2 s .co  m*/

    public static <E> String array2String(E[] array, int start, int end) {
        StringBuffer sb = new StringBuffer();
        sb.append("[");
        for (int i = start; i < end; i++) {
            sb.append(" ");
            sb.append(array[i]);
        }
        sb.append(" ]");
        return sb.toString();
    }
}

Related

  1. array2displaystr(Object[] datas)
  2. array2String(double[] array)
  3. array2string(final T[] array, final int top)
  4. array2string(int[] _a)
  5. array2String(int[] paramArrayOfInt)
  6. array2String(long[] array)