Java Array Merge merge(String[] strArray)

Here you can find the source of merge(String[] strArray)

Description

merge

License

Open Source License

Declaration

public static String merge(String[] strArray) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String merge(String[] strArray) {
        return merge(strArray, ' ');
    }/*from ww  w. j a v a 2 s  . com*/

    public static String merge(String[] strArray, char separator) {
        String retObj = null;

        if (strArray != null && strArray.length > 0) {
            retObj = "";
            for (String str : strArray) {
                retObj += str + separator;
            }
            retObj = retObj.substring(0, retObj.length() - 1); // remove final separator character
        }
        return retObj;
    }
}

Related

  1. merge(Object[][] array1, Object[][] array2)
  2. merge(String array[], String delimiter)
  3. merge(String[] array)
  4. merge(String[] array1, String[] array2)
  5. merge(String[] strArr1, String[] strArr2)
  6. merge(String[]... arrays)
  7. merge(T[] array, T[] temp, int left, int middle, int right)
  8. merge(T[] array1, T[] array2)
  9. merge(T[] first, T[] second)