Here you can find the source of printList(List l)
public static void printList(List l)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static void printList(List l) { String print = "Size is " + l.size() + ": "; for (int i = 0; i < l.size(); i++) { print += l.get(i).toString() + ", "; }/* w w w. j ava 2s .co m*/ System.out.println(print); } }