i have a question abt Hashset
in my program here
Set<String> set=new HashSet<String>(abc);
for(String s:set)
{
System.out.println(""+s);
}
}
in first line "abc" is a string variable and compiler is giving error...abt the constructor argument..
and this
Collection< String > collection
Set< String > set = new HashSet< String >( collection );
this code is running
i wanna know that how can i directly put and string value in the HashSet ?
plz help me