Here you can find the source of print(Collection
public static <T> void print(Collection<T> coll)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { public static <T> void print(Collection<T> coll) { if (coll == null) throw new NullPointerException(); if (coll.isEmpty()) return; for (T t : coll) { System.out.println(t); }/*from w w w . j a v a2 s . c o m*/ } }