Here you can find the source of printCollection(Collection col)
Print contents of collection.
Parameter | Description |
---|---|
col | a parameter |
public static void printCollection(Collection col)
//package com.java2s; /*/*w w w. j av a2s . c o m*/ * @(#)Util.java 1.00 2005/03/16 * @author Denny * Copyright (c) 1994-2005 Teansun, Inc. * All rights reserved. * * This software is the confidential and proprietary information of Teamsun, Inc. * You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into with Teamsun. * */ import java.util.*; public class Main { /** * <p>Print contents of collection.</p> * * @param col */ public static void printCollection(Collection col) { if (col != null) { Iterator itr = col.iterator(); while (itr.hasNext()) { System.out.println(itr.next().toString()); } } } }