Java Array to Delimited String arrayToReadableString(String[] array)

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

Description

array To Readable String

License

LGPL

Declaration

public static String arrayToReadableString(String[] array) 

Method Source Code

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

public class Main {
    public static String arrayToReadableString(String[] array) {
        if ((array == null) || (array.length == 0)) {
            return "";
        }//from w ww  . j  a v a  2  s . c o m

        StringBuilder sb = new StringBuilder();

        for (String s : array) {
            sb.append(", ");
            sb.append(s);
        }

        return sb.substring(2);
    }
}

Related

  1. arrayToDelimitedString(Object[] arr, String delim)
  2. arrayToDelimitedString(Object[] arr, String delim)
  3. arrayToDelimitedString(Object[] arr, String delim)
  4. arrayToDelimitedString(String[] values, String delimiter)
  5. arrayToDelimitedString(T[] array, String left, String delimiter, String right)
  6. arrayToTabSeparatedString( final String[] values)
  7. arrayToText(String[] values, String delimiter)