Here you can find the source of printList(Collection> collection)
public static void printList(Collection<?> collection)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static void printList(Collection<?> collection) { System.out.print("[ "); for (Object value : collection) System.out.print(value + ",\t"); System.out.println(" ]"); }/*from ww w . j a va 2 s . c o m*/ }