Java List to String toString(List coll, char delimiter)

Here you can find the source of toString(List coll, char delimiter)

Description

to String

License

Open Source License

Declaration

public static String toString(List<?> coll, char delimiter) 

Method Source Code

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

import java.util.List;

public class Main {
    public static String toString(List<?> coll, char delimiter) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < coll.size(); i++) {
            builder.append(coll.get(i));
            if (i < coll.size() - 1)
                builder.append(delimiter);
        }/*from  w ww.  j  a  v a2 s.  c  o  m*/
        return builder.toString();
    }
}

Related

  1. toString(List l)
  2. toString(List list)
  3. toString(List list)
  4. toString(List objects)
  5. toString(List col)
  6. toString(List list)
  7. toString(List list)
  8. toString(List list)
  9. toString(List list)