Java List to String listToString(List list)

Here you can find the source of listToString(List list)

Description

Converts an array to a String.

License

LGPL

Parameter

Parameter Description

Return

: The String.

Declaration

public static String listToString(List<String> list) 

Method Source Code

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

import java.util.List;

public class Main {
    /**/*from ww  w . ja v  a2 s. co  m*/
     * Converts an array to a String.
     * @param array:
     *   The array.
     * @return:
     *   The String.
     */
    public static String listToString(List<String> list) {

        String text = "";

        for (String s : list) {
            text += s;
            text += " ";
        }

        return text;

    }
}

Related

  1. listToString(List args)
  2. listToString(List l, String sep)
  3. ListToString(List list)
  4. listToString(List list)
  5. listToString(List list)
  6. listToString(List list)
  7. listToString(List list)
  8. listToString(List list)
  9. listToString(List list, String delimiter)