I need to remove the value . *see insert method - *
@Override
public void insertFaculty(Faculty e) {
setFaculty(e);
list.add(e.getname());
list.add(e.getfid());
list.add(Double.toString(e.getsalary()));
System.out.println("\n\nFaculty inserted sucessfully.");
}
Now I need to remove the value that was input from my insert method *I have try removed method but does not work(⊙_⊙;) *
@Override
public void removeFaculty(Faculty e) {
int i;
for(i = 1;i<list.size();i=i+1) {
System.out.println(list.get(i));
if(e.fid.equals(list.get(i))) {
System.out.println("Match found .");
list.remove(i-1);
list.remove(i);
list.remove(i+1);
}
else {
System.out.println("Not found .");
}
}
}