Java Array to String convertArrayToString(String[] array, char seperator)

Here you can find the source of convertArrayToString(String[] array, char seperator)

Description

convert Array To String

License

Open Source License

Declaration

public static String convertArrayToString(String[] array, char seperator) 

Method Source Code

//package com.java2s;

public class Main {
    public static String convertArrayToString(String[] array, char seperator) {

        if (array == null)
            return null;

        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < array.length; i++) {
            sb.append(array[i]);//w ww  . j a v  a  2 s  .  c  o m

            if (i != array.length - 1) {
                sb.append(seperator);
            }
        }

        return sb.toString();

    }
}

Related

  1. convertArrayToString(Object param)
  2. convertArrayToString(Object[] array, String separator)
  3. convertArrayToString(Object[] ig, int count)
  4. convertArrayToString(Object[] objArr)
  5. convertArrayToString(String[] array)
  6. convertArrayToString(String[] array, String separator)
  7. convertArrayToString(String[] array, String separator)
  8. convertArrayToString(String[] fields, String delimiter)
  9. convertArrayToString(String[] idArray)