code: private static String arraysToString(final Object[] a) {
      if (a == null) {
        return "null";
      }
      final int iMax = a.length - 1;
      if (iMax == -1) {
        return "[]";
      }
  
      final StringBuilder b = new StringBuilder();
      b.append('[');
      for (int i = 0;; i++) {
        b.append(String.valueOf(a[i]));
        if (i == iMax) {
          return b.append(']').toString();
        }
        b.append(", ");
      }
    }
docs: JDK 1.4 compatibility