code: public static String toArrayString(String[] arr) {
          StringBuilder b = new StringBuilder();
          b.append('{');
          for (int i = 0; i < arr.length; i++) {
              b.append(arr[i]);
              if (i < arr.length - 1) {
                  b.append(',');
              }
          }
          b.append('}');
          return b.toString();
      }
docs: Create array string.
  
  @param arr
  @return an array String.