Here you can find the source of toStringList(List> list)
public static String toStringList(List<?> list)
//package com.java2s; import java.util.List; public class Main { /** @METHOD */ public static String toStringList(List<?> list) { if (list.isEmpty()) return ("\tNO ITEM !!"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.size(); i++) { sb.append(list.get(i) + "\n"); }//from w ww .j av a2 s . c o m return sb.toString(); } }