Return to Snippet

Revision: 357
at July 11, 2006 00:26 by cetnar


Initial Code
List<String> listOfStrings = new LinkedList<String>( );

    listOfStrings.add("Happy");

    listOfStrings.add("Birthday");

    listOfStrings.add("To");

    listOfStrings.add("You");

    

    for (Iterator<String> i = listOfStrings.iterator( ); i.hasNext( ); ) {

      String s = i.next( );

      out.println(s);

    }

Initial URL

                                

Initial Description

                                

Initial Title
Iterating over generic list

Initial Tags
list

Initial Language
Java