The following snippet is neither producing any error or any warning, still i am not able to get the desired output. Can you guys please help me?
public static void status(String st){
System.out.println(st);
String str[] = st.split(",");
Iterator it = array.iterator(); //ArrayList contains csv imported values
while(it.hasNext()){
Employee emp = (Employee) it.next();
//Employee is a class with getter and setter
//If part is not working
if(emp.getName().equalsIgnoreCase(str[0]) && emp.getEmail().equalsIgnoreCase(str[1])){
emp.setStatus("O");
}
else{
System.out.println();
}
}
}
Aucun commentaire:
Enregistrer un commentaire