code: public static String arrayAsString(final String[] arg, String separator) {
  
          StringBuffer result = new StringBuffer();
          for (int i = 0; i < arg.length; i++) {
              result.append(arg[i]);
              if ((i + 1) < arg.length) {
                  result.append(separator);
              }
          }
          return result.toString();
      }
docs: Returns a string representation for the given array using the given separator.<p>
  
  @param arg the array to transform to a String
  @param separator the item separator
  
  @return the String of the given array