Skip to content

Instantly share code, notes, and snippets.

@brianduff
Created December 28, 2019 20:15
Show Gist options
  • Save brianduff/8b63dbd18c265d6efe595eb6887a06e1 to your computer and use it in GitHub Desktop.
Save brianduff/8b63dbd18c265d6efe595eb6887a06e1 to your computer and use it in GitHub Desktop.
Java 1.5 Features
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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment