Here you can find the source of toString(List> coll, char delimiter)
public static String toString(List<?> coll, char delimiter)
//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(); } }