Compare the following Programs?
import java.util.*;
public class SubWoofer1
{
public static void main(String args[])
{
Set<String> hashSet = new HashSet<String>(Arrays.asList(new String[] {"a", "b", "c", "d", "e", "e"}));
System.out.println(hashSet);
}
}
import java.util.*;
public class SubWoofer2
{
public static void main(String args[])
{
String[] strs = new String[] {"a", "b", "c", "d", "e"};
Set<String> hashSet = new HashSet<String>(Arrays.asList(strs, "e"));
System.out.println(hashSet);
}
}