Here you can find the source of toString(List l)
public static String toString(List l)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static String toString(List l) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < l.size() - 1; i++) { buf.append(l.get(i).toString()); buf.append("\t"); }// w w w . j a v a 2 s. co m buf.append(l.get(l.size() - 1).toString()); return buf.toString(); } }