Android String Array to String Convert StringArrayToString(List array)

Here you can find the source of StringArrayToString(List array)

Description

String Array To String

License

Open Source License

Declaration

public static String StringArrayToString(List<String> array) 

Method Source Code

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

import java.util.Arrays;
import java.util.List;

public class Main {
    public static String StringArrayToString(String[] array) {
        return StringArrayToString(Arrays.asList(array));
    }/*from   ww w. j a  va2s  .  c  o  m*/

    public static String StringArrayToString(List<String> array) {
        StringBuilder sb = new StringBuilder();
        for (String n : array) {
            if (sb.length() > 0)
                sb.append(',');
            sb.append("").append(n).append("");
        }
        return sb.toString();
    }
}

Related

  1. StringArrayToString(String[] array)
  2. getConcatenatedString(String... args)
  3. arrayToString(String[] array)
  4. implode(String[] array, String glue)