Java String Array to String array2string(String array[])

Here you can find the source of array2string(String array[])

Description

arraystring

License

Apache License

Declaration

public static String array2string(String array[]) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String array2string(String array[]) {
        if (array == null) {
            return "";
        }/*from   w w  w . ja v a2s.  c  o  m*/
        String str = "";
        for (int i = 0; i < array.length; i++) {
            str += array[i] + ",";
        }
        return str.substring(0, str.length() - 1);
    }
}

Related

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