code: private static String join(String[] values, String separator)
     {
        StringBuilder result = new StringBuilder();
        if (values != null)
        {
           for (int i = 0; i < values.length; i++)
           {
              if (i > 0)
              {
                 result.append(separator);
              }
              result.append(values[i]);
           }
        }
        return result.toString();
     }
docs: Joins the list of values.
  
  @param values values to join
  @param separator the separator to use
  @return joined list of values