Java tutorial
//package com.java2s; import java.util.List; public class Main { public static <T> String toString(List<T> values) { StringBuilder buffer = new StringBuilder(); for (T value : values) { buffer.append(value).append(System.lineSeparator()); } return buffer.toString(); } }