public static String join(String separator, Collection<String> values) {
		StringBuilder builder = new StringBuilder();
		boolean first = true;

		for (String value : values) {
			if (!first) {
				builder.append(separator);
			}

			builder.append(value);
			first = false;
		}

		return builder.toString();
	}
public static String join(String separator, Collection<String> values) {
		StringBuilder builder = new StringBuilder();
		boolean first = true;

		for (String value : values) {
			if (!first) {
				builder.append(separator);
			}

			builder.append(value);
			first = false;
		}

		return builder.toString();
	}
public static String join ( String separator , Collection < String > values ) { StringBuilder builder = new StringBuilder ( ) ; boolean first = true ; for ( String value : values ) { if ( ! first ) { builder . append ( separator ) ; } builder . append ( value ) ; first = false ; } return builder . toString ( ) ; }
Join all strings to a single one using given separator.

@param separator String separator.
@param values All string to join.
@return The final string.
Join all strings to a single one using given separator .