import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
import java.util.Vector;
public class VectorDemo {
public static void main(String[] args)
{
Set set=new HashSet(Arrays.asList( "H", "E", "E", "R", "A" ));
String[] so=new String[set.size()];
so=(String[])set.toArray(so);
for (int i = 0; i < so.length; i++)
{
System.out.println(so[i]);
}
System.out.println(set);
}
}