Skip to content

Instantly share code, notes, and snippets.

@ejknapp
Created January 31, 2014 23:59
Show Gist options
  • Save ejknapp/8745780 to your computer and use it in GitHub Desktop.
Save ejknapp/8745780 to your computer and use it in GitHub Desktop.
The Set demo from 1/30/2014
package java112.labs1;
import java.io.*;
import java.util.*;
/**
* @author Eric Knapp
* class SetDemo
* TODO: comment
*/
public class SetDemo {
public void run() {
Set set = new TreeSet();
set.add("Three");
set.add("One");
set.add("Four");
set.add("Two");
set.add("Four");
set.add("Four");
set.add("Four");
set.add("Four");
set.add("Four");
set.add("Four");
set.add("Four");
System.out.println(set);
}
public static void main(String[] args) {
SetDemo demo = new SetDemo();
demo.run();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment