package com.tutego.insel.util;

import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.TreeSet;

public class IteratorDemo
{
  public static void main( String[] args )
  {
    Collection<String> set = new TreeSet<String>();
    Collections.addAll( set, "Horst", "Schlämmer", "Hape" , "Kerkeling" );
    
    for ( Iterator<String> iterator = set.iterator(); iterator.hasNext(); )
      System.out.println( iterator.next() );
  }
}
