Java tutorial
//package com.java2s; //License from project: Apache License import java.io.PrintStream; public class Main { /** * Convenient method to print an iterable. * @param iterable iterable to print * @param out print stream */ public static void println(Iterable iterable, PrintStream out) { for (Object o : iterable) { if (o == null) { continue; } out.println(o.toString()); } } /** * Convenient method to print an iterable into System.out. * * @param iterable iterable to print * @see CollectionUtils#println(Iterable, PrintStream) */ public static void println(Iterable iterable) { println(iterable, System.out); } }