Java Utililty Methods Array Join

List of utility methods to do Array Join

Description

The list of methods to do Array Join are organized into topic(s).

Method

Stringjoin(String[] ar, String sep)
join
if (ar == null || ar.length == 0) {
    return null;
if (ar.length == 1) {
    return ar[0];
StringBuilder buf = new StringBuilder();
buf.append(ar[0]);
...
Stringjoin(String[] args)
Merge the given strings, using a space between each.
return join(" ", args);
Stringjoin(String[] args, String delimiter)
Returns a string containing all the elements of args, space delimited.
return join(Arrays.asList(args), delimiter);
Stringjoin(String[] array)
join string.
if (array.length == 0)
    return "";
StringBuilder sb = new StringBuilder();
for (String s : array)
    sb.append(s);
return sb.toString();
Stringjoin(String[] array)
Joins the given array into a comma-separated string.
return array == null ? null : join(asList(array));
Stringjoin(String[] array)
join
if (array.length == 0)
    return "";
StringBuilder sb = new StringBuilder();
for (String s : array)
    sb.append(s);
return sb.toString();
Stringjoin(String[] array)
Joins the the array elements to a string delimited by '\t'
return join(array, '\t');
Stringjoin(String[] array)
join
if (array.length == 0) {
    return "";
} else {
    StringBuilder sb = new StringBuilder();
    String[] arr$ = array;
    int len$ = array.length;
    for (int i$ = 0; i$ < len$; ++i$) {
        String s = arr$[i$];
...
Stringjoin(String[] array, String delim)
Concatenates all the elements in the given array, using the given delimiter.
StringBuffer sb = join(array, delim, new StringBuffer());
return sb.toString();
Stringjoin(String[] array, String delimiter)
join
StringBuffer sb = new StringBuffer();
if (array.length != 0) {
    sb.append(array[0]);
for (int i = 1; i < array.length; i++) {
    sb.append(delimiter);
    sb.append(array[i]);
return sb.toString();