Java Array to String arrayToString(Object[] array)

Here you can find the source of arrayToString(Object[] array)

Description

array To String

License

LGPL

Declaration

public static String arrayToString(Object[] array) 

Method Source Code

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

public class Main {
    public static String DEFAULT_SEPARATOR = "?";

    public static String arrayToString(Object[] array) {
        return arrayToString(array, DEFAULT_SEPARATOR);
    }// w w  w  . j  a va 2  s.  c  o m

    public static String arrayToString(Object[] array, String inSep) {
        if (array == null) {
            return null;
        }
        StringBuffer out = new StringBuffer();
        String sep = "";
        for (Object element : array) {
            out.append(sep + element);
            sep = inSep;
        }
        return out.toString();
    }
}

Related

  1. arrayToString(Object[] arr)
  2. arrayToString(Object[] arr)
  3. arrayToString(Object[] arr, String split)
  4. arrayToString(Object[] array)
  5. arrayToString(Object[] array)
  6. arrayToString(Object[] array)
  7. arrayToString(Object[] array)
  8. arrayToString(Object[] array)
  9. arrayToString(Object[] array)