Hi all,
Am trying to create simple Employ name collection i created one set and entered the elements into that with out any error . now am trying to use the contains method but am getting error please check my program and give me the solution please .
import java.util.*;
import java.util.Set;
import java.lang.String;
class EmpCollPrg
{
public static void main(String arg[])
{
Set Empset = new HashSet();
Empset.add("Kiran");
Empset.add("Shanker");
Empset.add("Dharma");
Empset.add("Feroz");
Empset.add("Hanuman");
Empset.add("Kamini");
Empset.add("Srikanth");
boolean contains(Empset "Kiran")
System.out.println(Empset);
Set Sortedset = new TreeSet(Empset);
System.out.println(Sortedset);
}
}