code: public static String arrayToString(Object array, boolean outputClass) {
      StringBuilder	result;
      int			dimensions;
      int			i;
      Object		obj;
  
      result     = new StringBuilder();
      dimensions = getArrayDimensions(array);
  
      if (dimensions == 0) {
        result.append("null");
      }
      else if (dimensions == 1) {
        for (i = 0; i < Array.getLength(array); i++) {
  	if (i > 0)
  	  result.append(",");
  	if (Array.get(array, i) == null) {
  	  result.append("null");
  	}
  	else {
  	  obj = Array.get(array, i);
  	  if (outputClass) {
  	    if (obj instanceof Class)
  	      result.append(((Class) obj).getName());
  	    else
  	      result.append(obj.getClass().getName());
  	  }
  	  else {
  	    result.append(obj.toString());
  	  }
  	}
        }
      }
      else {
        for (i = 0; i < Array.getLength(array); i++) {
  	if (i > 0)
  	  result.append(",");
  	result.append("[" + arrayToString(Array.get(array, i)) + "]");
        }
      }
  
      return result.toString();
    }
docs: Returns the given Array in a string representation. Even though the
  parameter is of type "Object" one can hand over primitve arrays, e.g.
  int[3] or double[2][4].
  
  @param array       the array to return in a string representation
  @param outputClass	whether to output the class name instead of calling
  the object's "toString()" method
  @return            the array as string