public String join(int[] array, String separator) {
        int size = array.length;
        StringBuilder buffer = new StringBuilder(512);
        for (int i = 0; i < size; i++) {
            int item = array[i];
            if (i > 0) { buffer.append(separator); }
            buffer.append(item);
        }
        
        return buffer.toString();
    }
public String join ( int [ ] array , String separator ) { int size = array . length ; StringBuilder buffer = new StringBuilder ( 512 ) ; for ( int i = 0 ; i < size ; i ++ ) { int item = array [ i ] ; if ( i > 0 ) { buffer . append ( separator ) ; } buffer . append ( item ) ; } return buffer . toString ( ) ; }
Join the contents of the given array separated by the given separator.
For example, the array [a, b, c] with separator ' ' would result in:
<code>a b c</code>.

@param array  The array to join
@param separator The separator between values

@return The resulting string