public static String toString(final Object... array) {
    final StringBuilder buffer = new StringBuilder("[");
    int count = 0;

    if (array != null) {
      for (Object element : array) {
        buffer.append(count++ > 0 ? ", " : "").append(element);
      }
    }

    buffer.append("]");

    return buffer.toString();
  }
The ArrayUtils class is an abstract utility class for working with Object arrays.
<p>

@see java.util.Arrays
@since GemFire 8.0
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/util/ArrayUtils.java