Java String Array to String array2str(String[] array, String delim)

Here you can find the source of array2str(String[] array, String delim)

Description

arraystr

License

Open Source License

Declaration

public static String array2str(String[] array, String delim) 

Method Source Code

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

public class Main {
    public static String array2str(String[] array, String delim) {
        StringBuffer s = new StringBuffer();
        for (int i = 0; i < array.length; i++) {
            if (i != 0) {
                s.append(delim);//from ww w  .  j a v  a 2  s .com
            }
            s.append(array[i]);
        }
        return s.toString();
    }
}

Related

  1. argsToString(String[] args)
  2. argsToString(String[] args, int start)
  3. argsToString(String[] args, int startFrom)
  4. arr2str(String[] arr)
  5. arr2str(String[] arr, String sep)
  6. array2str(String[] arrayname, int length)
  7. array2string(String array[])
  8. array2string(String[] s)
  9. arrayAsString(String[] haystack)