//Client is required to pass collection of String and name
static boolean checkName(Collection employeeNameList, String name) {
for (Iterator i = employeeNamList.iterator(); i.hasNext(); ) {
String s = (String) i.next();
if(s.equals(name)){
return true;
//print employee name here ......
}
}
return false;
}