package javaapplication1;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashSet;
public class JavaApplication1 {
public static void main(String[] args) {
HashSet hashSet = new HashSet();
hashSet.add("a");
hashSet.add("b");
hashSet.add("c");
hashSet.add("d");
hashSet.add("e");
hashSet.add("f");
hashSet.add("g");
Enumeration e = Collections.enumeration(hashSet);
while (e.hasMoreElements())
System.out.println(e.nextElement());
}
}
/*
run:
a
b
c
d
e
f
g
*/