Java Array to String arrayToString(String values[])

Here you can find the source of arrayToString(String values[])

Description

array To String

License

Open Source License

Declaration

public static String arrayToString(String values[]) 

Method Source Code

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

public class Main {
    public static String arrayToString(String values[]) {
        if (null == values)
            return "";
        StringBuffer buffer = new StringBuffer(values.length);
        for (int i = 0; i < values.length; i++)
            buffer.append(values[i]).append(",");

        if (buffer.length() > 0)
            return buffer.toString().substring(0, buffer.length() - 1);
        else//from  w  w  w. j ava 2  s . c om
            return "";
    }
}

Related

  1. ArrayToString(Object[] row, StringBuilder sbf)
  2. arrayToString(Object[] subject)
  3. arrayToString(String array[], String separator)
  4. arrayToString(String format, double[] array)
  5. arrayToString(String in[])
  6. arrayToString(String[] a, String delim)
  7. arrayToString(String[] a, String separator)
  8. arrayToString(String[] args, String delimiter)
  9. arrayToString(String[] arr)