code: public static String join(List<String> list) {
      if (list == null) {
        return null;
      }
  
      StringBuilder joined = new StringBuilder();
      boolean first = true;
  
      for (String element : list) {
        if (first) {
          first = false;
        } else {
          joined.append(",");
        }
        joined.append(element);
      }
  
      return joined.toString();
    }
docs: Joins the given {@code list} into a comma-separated string.
  
  @param list
  The list to join.
  @return A comma-separated string representation of the given {@code list}.