Java List to String listToString(List list)

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

Description

list To String

License

Open Source License

Declaration

public static String listToString(List list) 

Method Source Code


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

import java.util.*;

public class Main {
    public static String listToString(List list) {
        String ret = "{";
        for (int i = 0; i < list.size(); i++) {
            if (i > 0)
                ret += ", ";
            ret += list.get(i).toString();
        }/*from  w w  w .jav a  2 s .c  om*/
        ret += "}";
        return ret;
    }
}

Related

  1. listToString(Iterable list)
  2. listToString(List a, String separator)
  3. listToString(List inList, String delimeter)
  4. listToString(List l)
  5. listToString(List l)
  6. listToString(List list)
  7. listToString(List list)
  8. listToString(List list, char sep)
  9. listToString(List list, String delim)