I've also been trying out Java 1.5. My first ever "it's technically useless, but demonstrates the new language features" java 1.5 program:
import java.util.*;
public class TestClass
{
public static void main( String[] args )
{
List<String> words = new ArrayList<String>();
words.add( "This" );
words.add( " is" );
words.add( " cool :)" );
for(String str : words )
{
System.out.println( str.trim() );
}
List<Integer> ints = new ArrayList<Integer>();
ints.add( 1 );
ints.add( 2 );
ints.add( 3 );
}
public enum ThingType
{
FIRST, SECOND, THIRD;
}
}