Java Collection Print printCollection(Collection collection)

Here you can find the source of printCollection(Collection collection)

Description

print Collection

License

Open Source License

Declaration

public static void printCollection(Collection collection) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;
import java.util.Iterator;

public class Main {
    public static void printCollection(Collection collection) {
        Iterator itr = collection.iterator();
        System.out.println("-----Printing Collection-----");
        while (itr.hasNext()) {
            System.out.println(itr.next());
        }//from   ww w.  j a va 2 s  .co  m
        System.out.println("-----End Of Collection-----");
    }
}

Related

  1. print(Collection coll)
  2. print(Collection elements)
  3. print(java.util.Collection collection)
  4. printCollection(Collection c)
  5. printCollection(Collection col)
  6. printCollection(Collection l)
  7. printCollection(Collection col)
  8. printCollection(Collection collections)
  9. printCollection(final Collection collection)