code: public static <T> String join(List<T> list, String delimiter) {
          if (list.isEmpty()) {
              return "";
          }
  
          final StringBuilder sb = new StringBuilder();
          for (T element : list) {
              sb.append(element);
              sb.append(delimiter);
          }
          sb.delete(sb.length() - delimiter.length(), sb.length());
          return sb.toString();
      }
docs: Create a string out of the list's elements using the given delimiter.
  
  @param list List to create a string from.
  @param delimiter Delimiter to use between elements.
  @param <T> Type of elements in the list.
  @return A string created from the given list's elements, delimited by the given delimiter.